HaxeFoundation / HaxeFoundation/haxe

Automatic handling of incompatible hxb cache

Open
#12,368 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

For haxelib run scripts running via eval, it is useful to be able to create a hxb cache to reduce script startup times: https://github.com/HaxeFoundation/haxelib/pull/674

It would be nice if haxe could provide automated handling of the hxb cache to make sure it's up to date. Haxelib would just provide haxe with a hxb file path, and then haxe would automatically:

- Use the hxb file if it exists and is compatible with the current haxe version
- If it is incompatible or corrupt, ignore it, compile from scratch, and generate a new hxb file

This would reduce the amount of interactions haxelib has to have with haxe to use the cache. This way, haxelib would just have to run a single haxe command.

@kLabz suggested something like:
```
haxe ... --hxb bin/main.hxb --hxb-lib bin/main.hxb -D hxb.skipVersionMismatch
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.