Skip to content

Include extraParams.hxml when library path is overridden. - #2010

Open
player-03 wants to merge 4 commits into
openfl:developfrom
player-03:Haxelib_pathOverrides_extraParams
Open

player-03 wants to merge 4 commits into
openfl:developfrom
player-03:Haxelib_pathOverrides_extraParams

Conversation

@player-03

Copy link
Copy Markdown
Contributor

When including a haxelib with an overridden path (such as Lime itself, when using a local Haxelib repo), Lime fails to copy extraParams.hxml, potentially breaking compilation. This checks for the file and copies all non-comment lines if found.

Closes #2004, supersedes #2009.

@player-03
player-03 force-pushed the Haxelib_pathOverrides_extraParams branch from 6635946 to 2e856bd Compare December 17, 2025 23:15
@player-03
player-03 changed the base branch from 8.4.0-dev to develop December 17, 2025 23:15
@player-03 player-03 changed the title Include _extraParams.hxml_ even when path overridden. Include extraParams.hxml when library path is overridden. Dec 17, 2025
@tobil4sk

Copy link
Copy Markdown
Member

It would be ideal if we could pass this onto haxelib, then we wouldn't have to worry about missing behaviour in future

@player-03

Copy link
Copy Markdown
Contributor Author

Agreed, that would be ideal.

But as far as I know, you can't pass a file path to haxelib path, only a library name. Nor is there a different command that takes a path. So using Haxelib would mean getting rid of pathOverrides entirely, and I assume it's there for a reason.

@Tutez64

Tutez64 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Closing #2101 as a duplicate of this. The extras versus this branch (trim, skip -L, -D name without =, matching the haxelib path branch) are on player-03#10

player-03 and others added 3 commits September 19, 2026 14:18
Reusing the same code ensures they'll be treated the same way, and that any future changes will affect both equally.

Resolves #10

Co-authored-by: Tutez64 <enzopersillet@gmail.com>
Co-authored-by: Tutez64 <enzopersillet@gmail.com>
@player-03

player-03 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Having looked closer at Haxelib's implementation, it doesn't look like they have any interest in supporting custom paths. But I came up with a couple other options.

  • On *nix systems, we could add HAXELIB_PATH=custom/path before running haxelib path lib_name to get it to find the directory we wanted. However, AFAIK there's no equivalent on Windows. (Short of setting HAXELIB_PATH globally, then reverting it, which is dangerous.)
  • Haxelib supports local repos named ".haxelib". However, it will use the local repo exclusively and will fail to find anything installed globally (which is a problem if that's where Lime is). We could work around this in various convoluted ways, but ultimately, local repos aren't meant for this use case.
  • Presumably if we asked the Haxelib developers, they would tell us that this is what haxelib dev is for. And that would certainly work, but it still involves overwriting an existing library's path, even if only for a moment.

My best idea so far is creating a local repo in Export/.haxelib, and using haxelib dev inside that, followed by haxelib path. Since it's in Export, Haxelib will only find it if we setCwd() first, otherwise it'll use the global repo.

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.

Bug: Embedded Sounds causes an exception with Haxelib local repo

3 participants