Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring elm branch up-to-date with master to fix ihp-new for elm #40

Merged
merged 58 commits into from
Dec 21, 2024

Conversation

james64
Copy link

@james64 james64 commented Dec 18, 2024

There is an issue with ihp-new --elm myProject command tracked as issue here: digitallyinduced/ihp#1955 .

This pr merges master branch into elm. There were merge conflicts in start and default.nix files which were resolved in favor of master version.

Merged version were tested by running edited local copy of ihp-new bash script which pointed to my version of boilerplate git repo. This successfully created a project files. start script successfully started dev server, web based ide and dummy version of application itself. Based on initial webapp msg elm is not working but that is a different issue.

pauldub and others added 30 commits April 22, 2023 14:42
Co-authored-by: Lars Lillo Ulvestad <[email protected]>
Co-authored-by: Lars Lillo Ulvestad <[email protected]>
Co-authored-by: Lars Lillo Ulvestad <[email protected]>
the old version wasn't compatible with packages.system.default
outputs in flakes
Eisfunke and others added 23 commits July 18, 2023 16:21
nix should lock the inputs itself on first call
Without the lockfile ihp-new crashes when creating a new project
* Add more defaults an docs to flake.nix

* SMTP config for local development.

* Code review fixes

* Change app name to `qa`

* Remove mailhog from packages

* Add SMTP_ENCRYPTION

* envName

* Update flake.nix

* Update flake.nix

* Apply suggestions from code review

Co-authored-by: Marc Scholten <[email protected]>

* Apply suggestions from code review

---------

Co-authored-by: Marc Scholten <[email protected]>
…nduced#32)

* Add config with placeholder for logging to AWS CloudWatch

* Comment out services.vector
* Add IHP_SESSION_SECRET placeholder

* Add comment

* Improve comment
@james64
Copy link
Author

james64 commented Dec 18, 2024

I have realized that elam not working might be some functionality of former start script which was not migrated to devenv setup. I will try to dig in later

@mpscholten
Copy link
Member

Thanks 👍

I think the npm run run-dev-elm in the start script needs to be added to the devenv configuration in flake.nix:

                # Custom configuration that will start with `devenv up`
                devenv.shells.default = {
                    # Start Mailhog on local development to catch outgoing emails
                    # services.mailhog.enable = true;

                    languages.elm.enable = true;

                    processes = {
                        frontend.exec = "parcel watch elm/index.js --out-dir static/elm";
                    };
                };

@james64
Copy link
Author

james64 commented Dec 21, 2024

I have added npm build command to flake.nix as suggested. This works for me now. Only it looks like npm has to be installed on the system already and npm install needs to be run manually.

@mpscholten do you want me to add npm to elm tooling with auto run for npm install? Or do you want to merge it as is? Because of my own curiosity I will try to do these things. It's just that it will take me some time. I need to learn this devenv thing as it's new to me. Let me know

@mpscholten
Copy link
Member

Best option seems to be both: we merge the current PR as is, so elm is working again. And I'd be happy to merge a second PR that improves the npm workflow. Ideally removing the need for a manual npm install :)

@mpscholten mpscholten merged commit a56f7c6 into digitallyinduced:elm Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants