-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add "why" command #525
base: development
Are you sure you want to change the base?
Add "why" command #525
Conversation
src/haxelib/client/Main.hx
Outdated
|
||
if (haxelibResults != Failure) | ||
return haxelibResults; | ||
} else if (line.endsWith('.hxml')) { |
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.
This check could fail if the file extension is uppercased.
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.
Oh, it can be uppercased??
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.
Yes. Some file systems are case-insensitive.
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.
The line is now forced to lowercase it latest version. However in other parts of the code (which I haven't written) it doesn't take case into consideration
Add a test please. |
Some tests break and my tests don't seem to run : ( I don't think it's related to my test. |
I don't see a button to run CI for PRs. @Simn , do you have it? |
No |
Will you guys handle the run.n? it seems like a recompile will be required anyway |
You need to merge development and avoid committing |
Adds "why" command, which finds the reason a library must be included. Basic documentation:
haxelib why [library]
Looks through the haxelib.json dependecies, and returns the dependency path if it's found, or states it couldn't find the library.
haxelib why [library] [hxml]
Looks through the hxml file and finds why a library is required, returning the dependency path if it's found, or states it couldn't find the library. Follows
--library
tags and hxml references.Similar to yarn's why command
Optimization: This probably needs optimization, as it traverses the tree of dependencies of a tree. Threading would be helpful
Further Improvements: Right now, it only returns 1 path, when it may be required in multiple places.