Repository navigation
Haxelib: name the missing dependency when haxelib can't resolve a library - #43
Merged
Merged
Conversation
…rary getPath() asked haxelib for the path with ignoreErrors but without returnErrorValue, so when haxelib failed, its error output was dropped and the dependency check never saw it. The check also only looked for "haxelib install X", which haxelib 4 no longer prints; it reports "Library X is not installed" or "Library X version Y is not installed". getPath() now keeps haxelib's error output and recognises both forms, so a missing dependency is reported as such instead of as the library that depends on it.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a library is installed but one of its dependencies isn't, hxp reports the library itself as missing. Lime's tools hit this in OpenFL's CI, where Lime develop's new StageWebView dependency wasn't installed and the error was
Could not find haxelib "lime", does it need to be installed?.There were two causes.
getPath()runshaxelib pathwithignoreErrorsbut notreturnErrorValue, so when haxelib fails (empty stdout, error on stderr) the output comes back null and the existing dependency check has nothing to read. That check also only looks forhaxelib install X, while haxelib 4 printsLibrary X is not installedorLibrary X version Y is not installed.getPath()now keeps haxelib's error output and recognises the haxelib 4 messages. The olderhaxelib installcheck is unchanged.Checked with haxelib 4.2.0 and a local repo (
haxelib newrepo), callingHaxelib.getPath(lib, true)from a small Neko script, before and after:Could not find haxelib "deplib", nowCould not find haxelib "missing-xyz" (dependency of "deplib")Could not find haxelib "notthere-abc"Could not find haxelib "deplib" version "2.0.0"Also compiles with Haxe 3.4.7. run.n is not rebuilt.