Skip to content

Haxelib: name the missing dependency when haxelib can't resolve a library - #43

Merged
dimensionscape merged 1 commit into
masterfrom
fix/haxelib-missing-dependency
Nov 24, 2026
Merged

dimensionscape merged 1 commit into
masterfrom
fix/haxelib-missing-dependency

Conversation

@dimensionscape

Copy link
Copy Markdown
Member

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() runs haxelib path with ignoreErrors but not returnErrorValue, 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 for haxelib install X, while haxelib 4 prints Library X is not installed or Library X version Y is not installed.

getPath() now keeps haxelib's error output and recognises the haxelib 4 messages. The older haxelib install check is unchanged.

Checked with haxelib 4.2.0 and a local repo (haxelib newrepo), calling Haxelib.getPath(lib, true) from a small Neko script, before and after:

  • library with a missing dependency: was Could not find haxelib "deplib", now Could not find haxelib "missing-xyz" (dependency of "deplib")
  • library that isn't installed: unchanged, Could not find haxelib "notthere-abc"
  • missing version: unchanged, Could not find haxelib "deplib" version "2.0.0"
  • library whose dependencies are installed: unchanged, returns its path

Also compiles with Haxe 3.4.7. run.n is not rebuilt.

…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.
@dimensionscape dimensionscape mentioned this pull request Nov 24, 2026
@dimensionscape
dimensionscape merged commit a369877 into master Nov 24, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

1 participant