-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update prebuild naming to scheme #25
Comments
I like the idea a lot because it solves the current use cases and gives more room for future requirements. I'm more curious how it would work api wise, like how |
@ralphtheninja We'd add some built in flags like |
Aye, I figured we need something to make the interpretation. I'd like to keep the format consistent though, so everything before the ending So lets drop some tags we want:
Side note: Does |
You mean e.g. How about defining shortcuts for some of the tags, e.g.
+
|
👍 |
@vweevers ya sgtm |
Re: alpine: older alpine uses glibc, so to keep open the option of supporting older alpine (if and when someones asks for it), I don't think we should use |
Would it be feasible/helpful to publish some sort of manifest alongside the binaries? Then |
What would this manifest look like and how do you see it working? |
{
"prebuilds": [{
"path": "does-the-name-matter-anymore.node",
"tags": {
"platform": "linux",
"arch": "x64",
"runtime": "node",
"napi": true
}
}]
} // node-gyp-build pseudo-code
// Ignore paths being relative for a moment
var manifest = JSON.parse(fs.readFileSync('manifest.json', 'utf8'))
// Assume that prebuilds are ordered most-specific first
for (var prebuild of manifest.prebuilds) {
if (match(prebuild.tags)) {
return require(prebuild.path)
}
} |
Manifest sounds good. We should still make the filenames deterministic though based on the input, so they are auto overwritten if you prebuild twice |
I like it. When is this manifest written? If it's supposed to be one manifest, e.g. |
I'd put a manifest inside the ./prebuilds/{os} folder so it can all be tarred up and put on s3/github releases and all a download script needs to do is fetch it |
i'm wondering if we even need the |
I'd keep it seperate as you are building on each of those platforms individually using CI, so if you get rid of the folder you'd have to add a bunch of merging logic to download prebuilds instead of a simple curl + tar |
Got it. So then we should keep the same folder structure as we have now. |
@mafintosh What does the |
@vweevers it's |
Eh,
|
Updated to: remove manifests, add |
As for separators: some options, using a runtime that has dashes in its name (ignore the nonsensical combination of tags):
|
I don’t personally think we need custom tags in practice. I like 5. |
Started working on this. I'm wondering, for tags that we can't always detect the value of (like
I prefer 3 or 4, because like we did for the other options (#26), it'd be nice to also make |
Nevermind, 4 is easy to achieve, I'll go with that. |
With the added metadata from various PRs plus my personal intent to add stuff like the libuv major version to the name for prebuilds that use that (to ensure abi compatibility) I've been thinking we should make our naming a bit more generic.
Here are my thoughts.
Currently our prebuild names look like this:
{runtime}-{napi|abi}.node
I suggest we move to something a bit more explicit like this:
{runtime}-{name(.value)?}-{name(.value)?}....node
For example for a napi build for node that tags the uv major version
1
:node-napi-uv.1.node
Or one that tags a special libc for abi 40:
node-abi.40-libc.musl.node
or to tag alpine as the os,node-abi.40-os.alpine.node
The prebuild picker, node-gyp-build would then pick the one with the most tags that match (obvs abi or napi must match first etc).
WDYT? The use of
.
and-
as separators is somewhat arbitrary and I'm open for suggestionsThe text was updated successfully, but these errors were encountered: