Giter VIP home page Giter VIP logo

Comments (9)

thelayeredmind avatar thelayeredmind commented on June 12, 2024

Hey there, running into the same problem unfortunately. It keeps me from compiling the docs.
I checked the package constraints and they seem to be correct on my end. I've tried to investigate more into
lamdera/codecs but could not find much about it. I also tried to install in manually with elm install lamdera/codecs which returns @supermario 's message. Please tell me, if I can help in any way investigating this further, or point me to a relevant issue or source related to this package.

I am running it on my WSL 2 (5.15.133.1-microsoft-standard-WSL2),
with elm-pages (3.0.11),
elm (0.19.1) with the two packages "elm/bytes": "1.0.8", "elm/core": "1.0.5"

from elm-pages.

Erudition avatar Erudition commented on June 12, 2024

Same problem here, is there a way to see docs otherwise?

from elm-pages.

thelayeredmind avatar thelayeredmind commented on June 12, 2024

@Erudition I believe not, since the main point of the local docs, is that they are able to reflect your locally generated code, for routes and other components. Do you use the same elm and elm-pages version as me? (Just out of curiosity)

from elm-pages.

supermario avatar supermario commented on June 12, 2024

@thelayeredmind I'm not sure where you were looking at those deps, but it would be lamdera install lamdera/codecs if you wanted to add that package.

That said, my hypothesis is this is happening because of wherever elm-pages is building the docs harness. I already have the deps in my project's elm.json:

# mario ~/dev/projects/elmcraft.org ± main x
$ cat elm.json | ack lamdera
            "lamdera/codecs": "1.0.0",
            "lamdera/core": "1.0.0",

So in this instance I don't think project deps are the issue.

from elm-pages.

thelayeredmind avatar thelayeredmind commented on June 12, 2024

@supermario I think there has been a misunderstanding. The deps are not the problem, I also knew that. I found that lamdera/codecs are specified in the deps list of elm.json in the generated code (./elm-stuff/elm-pages/elm.json, ).
However the error message asked for local compilation to get more information. I was unsure about that part.
I am curious and wanted to investigate this issue further.
I installed the package with lamdera install lamdera/codecs, but all this ended up doing is to add the deps to my list and not building the package itself:

$ lamdera install lamdera/codecs
Here is my plan:

  Add:
    lamdera/codecs    1.0.0

Would you like me to update your elm.json accordingly? [Y/n]: Y
Success!

My questions therefor are these:

  • Where can I find more documentation about lamdera/codecs ?
  • How can I build the package locally within my elm-pages environment to identify any further problems?

from elm-pages.

dillonkearns avatar dillonkearns commented on June 12, 2024

The problem is that elm-doc-preview uses an elm executable, but lamdera/codecs is a special dependency that is built in to lamdera.

There are a few places where I inject lamdera/codecs into the elm.json of some internal generated sub-projects. I could remove it from the right place, but I need to make sure that it doesn't break compilation for those sub-projects either. If it does, then it would require a more substantial amount of work to have a separate hidden project to use for running the docs server.

from elm-pages.

dillonkearns avatar dillonkearns commented on June 12, 2024

Okay, so it is a shared folder. The easy way to do it is to just not add lamdera/codecs when it's generating that folder for elm-pages docs, but if you're also running a dev server at the same time (which would be quite common) then the file generation for those two would be fighting each other. So I think it's going to need to be reworked to generate a separate sub-folder with its own elm.json to use.

from elm-pages.

thelayeredmind avatar thelayeredmind commented on June 12, 2024

@dillonkearns Awesome that you are on it, I appreciate that. But isn't this just combatting the sympton instead of the root cause?
Why is the package lamdera/codecs fighting with the package constraints in the first place? It seems to be matching those rules.
I personally use the dev server and would like to run the docs aswell. But it is not project breaking; I can just navigate the generated code for reference for now, it would just be a nice to have. Usually I can fix most problems on my own, but I got stuck on this one, since I don't really understand where the core problem lies and can't find anythign about this topic other than this issue.

from elm-pages.

dillonkearns avatar dillonkearns commented on June 12, 2024

@thelayeredmind lamdera/codecs is a sort of magic dependency that Lamdera knows about, but Elm does not. There's not really much more to know about it, the message that the Elm compiler gives about it is not helpful, it's just a dependency that is not meaningful to Elm because it is a special Lamdera package that can only be installed and used by Lamdera.

from elm-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.