Skip to content

Conversation

@pithub
Copy link
Member

@pithub pithub commented Oct 22, 2025

#46 introduced the ability to use multiple modules in LocalDev.elm. This was achieved by adding elm-stuff/lamdera as an extra source directory to the Outline when reading the user'selm.json file.

Unfortunately, with commands like lamdera install, the modified outline can sometimes be mistakenly written back to the filesystem. This can then result in errors like:

-- AMBIGUOUS NAME ----------------------- elm-stuff/lamdera/LamderaCheckBoth.elm

This usage of `T2.ToFrontend` is ambiguous.

With this change, the additional source directory is added later, specifically in the Build.hs Env data structure, which is not written back to the filesystem. Additionally, the change only takes effect when the LocalDev.elm module is compiled, and not with commands like lamdera install.

crawlDeps env mvar deps (SOutsideOk local source modul)
Lamdera.alternativeImplementationWhen (lamderaIsLiveHarnessModule modul)
(crawlDeps (lamderaLiveHarnessEnv env) mvar deps (SOutsideOk local source modul)) $
crawlDeps env mvar deps (SOutsideOk local source modul)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move our alternative to the end using & instead of $ to preserve the original line & minimise the diff.

Copy link
Member Author

@pithub pithub Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this 🙂 I'm a big fan of minimal diffs!

@supermario supermario merged commit 4069066 into lamdera-next Oct 23, 2025
@supermario supermario deleted the pit-localdev-fix branch October 23, 2025 21:25
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.

3 participants