-
Notifications
You must be signed in to change notification settings - Fork 132
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
Detect module imports from transitive dependencies #730
Detect module imports from transitive dependencies #730
Conversation
…cluded by a transitive dependency
Notably left out of this is the check for unused dependencies. I was talking about that with @thomashoneyman and he mentioned that we may not want to fail the build on detection of unused dependencies - for instance, someone may have |
Right now I've only included the import check as part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wooow, great work here @colinwahl! 👏
The implementation is not yet covering all the cases, so I left some comments to detail the missing parts, but we're definitely on the right path.
Another minor note: as I specified in #723 (which after this will become a piece of cake!), it's important that we skip this check if the purs
version is lower than 0.13.8
.
I'd store the version (note that we already have code to get it) inside the PursCmd
- in this way we could figure it out at startup, here
I got quite busy and haven't had a chance to update this branch yet - I plan on having some more time this week to keep moving on this. |
@f-f I was running this on my work codebase and also creating a test when I realized that I'm not sure if That being said, I don't think that we can implement this check with the current implementation of Was this behavior of Edit: I just read the release notes https://github.com/purescript/purescript/releases/tag/v0.13.8 and it looks like this is not intended - I logged purescript/purescript#3991 |
… dependency and warning on unused package dependencies
With the release of PureScript 0.14, I can continue work on this. I hope to pick it back up soon! |
@colinwahl is there something I can do to help with this? |
@f-f To be honest I had lost where I was on this! I think I was mostly stuck on the tests before: I was having trouble getting the fixture file to match the output, even though the output was what I wanted. I've fixed that now! Another thought I had: |
@colinwahl yes please! It shows that this change is needed so badly since we got the dependencies wrong even in the default project 😄😄 |
Ah, the tests are failing because the Should I bump the version in the tests? I don't know if there's a plan to test against multiple versions of |
Okay, I did some investigation into the build failures, and it's caused by how I'm handling My confusion is with the implementation of Should it handle when The failures in the appveyor are caused because I think that I'll modify
And if |
That explains the issue with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great call on refactoring the PursCmd
type, I think this is exactly what we need!
I had a last round of review and I left a bunch of minor comments, I think we're good to merge once we take care of them. Great work! 🙂
…ansitive dependencies. the errors tell you exactly what to do
@f-f I've addressed your review comments and updated the changelog to reflect everything that got done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@colinwahl thank you for the great work, this is perfect now! 👏 👏
I added you as a collaborator, so you can merge yourself once CI is all green 😊
Thanks @f-f ! I'm not seeing permission to merge, not sure what that's about - but I'll merge once it shows up! We usually squash-and-merge, right? |
|
Oh! Duh, didn't think to check my email :D |
Thanks @f-f and @thomashoneyman for the help on this! |
This intends to close #598
Description of the change
Adds a step to
build
to check if a source file imports a module that is part of a transitive dependency.In that case, we fail the build and report those packages to the user.
Also, adds a step to
build
which warns on unused dependencies.Checklist:
Added some example of the new feature to theREADME