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: Dependencies not recognized #93

Closed
brasilikum opened this issue Jul 12, 2017 · 3 comments
Closed

Bug: Dependencies not recognized #93

brasilikum opened this issue Jul 12, 2017 · 3 comments

Comments

@brasilikum
Copy link
Contributor

Im my project, dependencies do not seem to be recognized, because Package Dependencies is empty and Module Graph tells me I have 0 Imports, which is not true because I my Main.elm is full of imports. The project is not public, but maybe you can help me with the following info:

package.json:

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "NoRedInk/elm-decode-pipeline": "3.0.0 <= v < 4.0.0",
        "elm-lang/core": "5.1.1 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "elm-lang/http": "1.0.0 <= v < 2.0.0",
        "elm-tools/parser": "2.0.1 <= v < 3.0.0",
        "krisajenkins/remotedata": "4.3.0 <= v < 5.0.0",
        "ohanhi/remotedata-http": "2.0.2 <= v < 3.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}
$ elm analyse -s
Elm Analyser server starting with config:
{ port: 3000, elmFormatPath: 'elm-format' }
Listening on http://localhost:3000
INFO: No configuration provided. Using default configuration.
INFO: Load dependency NoRedInk/elm-decode-pipeline3.0.0
INFO: Load dependency elm-lang/core5.1.1
INFO: Load dependency elm-lang/html2.0.0
INFO: Load dependency elm-lang/http1.0.0
INFO: Load dependency elm-tools/parser2.0.1
INFO: Load dependency krisajenkins/remotedata4.3.0
INFO: Load dependency ohanhi/remotedata-http2.0.2
INFO: Load file Main.elm...
Found 22 message(s)
 $ tree -L 3   
.
├── Caddyfile
├── elm.js
├── elm-package.json
├── elm-stuff
│   ├── exact-dependencies.json
│   └── packages
│       ├── elm-lang
│       ├── elm-tools
│       ├── krisajenkins
│       ├── NoRedInk
│       └── ohanhi
├── index.html
└── Main.elm

7 directories, 6 files
@stil4m
Copy link
Owner

stil4m commented Jul 12, 2017

Both the Package Dependencies and Module Graph currently only include the current projects source files. This excludes all Elm modules that are not defined in a path that matches source-directories or exist in elm-stuff.

The term Package resist on the folder structure you can use to define Elm files. Maybe this is confusing. What do you think? (All in all, I am currently not sure if the 'Package Dependencies' tab should remain in future versions of elm-analyse)

Currently I only see one Elm file in your project (Main.elm), if you create more files and have dependencies between them, these will show up in both sections of the UI.

Does this clear things up?

@stil4m stil4m added the bug label Jul 12, 2017
@stil4m stil4m removed the bug label Aug 17, 2017
@stil4m
Copy link
Owner

stil4m commented Aug 17, 2017

Closed this as not a bug, but as an unclarity. If someone else encounters the same thing, this will be picked up.

@stil4m stil4m closed this as completed Aug 17, 2017
@jsoo1
Copy link

jsoo1 commented Jul 22, 2020

This causes any dependency only used in Main to be reported as unused.

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

No branches or pull requests

3 participants