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

🐞 Bug – elm-land customize breaks builds for other developers in a team #155

Closed
vladimirlogachev opened this issue Dec 3, 2023 · 3 comments
Assignees

Comments

@vladimirlogachev
Copy link

vladimirlogachev commented Dec 3, 2023

Problem

The current customize (and then generate/build/server) implementation doesn't work with team of more than 1 developer. When one developer customizes the app in any way, it breaks build for all other developers, and they are forced to remove the .elm-land directory.

Why this porblem is real and worth solving:

  • Lets's say we have a team of 5 developers and a repo with 4 elm-land apps (landing, user app, admin app and UI kit, storybook-alike).
  • When one developer customizes 1 thing in all 4 apps, the remaining 4 devs are forced to remove 16 directories (4 each).
  • And this operation is repeated every time something is being customized.

Steps to reproduce:

git clone https://github.com/vladimirlogachev/elm-land-codegen-bug.git
git reset --hard 123d6307c99c8869646c1ebee9a2830b7c6ad5a2 # after `elm-land init`
elm-land build # succeeds
git reset --hard c2fded11aca270d4137393a45d63e41dfc95850d # after `elm-land customize shared`
elm-land build # fails

Your setup

  • What operating system (Mac/Window/Linux) are you using? Please provide a version!
  • Please share the output of the following commands:

macOS 14.1.2 (23B92)
node -v: v18.18.0
elm-land -v: v0.19.4

@ryan-haskell
Copy link
Contributor

Hey @vladimirlogachev πŸ‘‹

Let me know if I'm understanding this correctly:

  1. Developer A runs elm-land customize view
  2. Developer A pushes the new src/View.elm to version control
  3. Developer B pulls the update
  4. Developer B has to manually remove their .elm-land/src/View.elm, because it leads to a Elm compiler error

Is that an accurate description of the problem?

@vladimirlogachev
Copy link
Author

vladimirlogachev commented Dec 8, 2023

Yes, the description is accurate.

And it's confusing not only because Developer A expects it to work, but also because GitHub Action checks pass.

I would expect codegen to do the following:

  • If there is a default module and a custom module, just delete the default and proceed
  • If there is none (e.g. a developer deleted a custom module later), just create the default one

@ryan-haskell
Copy link
Contributor

Hey @vladimirlogachev – sorry for the wait, this issue is now fixed in v0.19.5 (#160)

Thanks for helping make Elm Land more bug-free! 🌈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants