Skip to content
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

New naming scheme #19

Merged
merged 2 commits into from
Apr 26, 2019
Merged

New naming scheme #19

merged 2 commits into from
Apr 26, 2019

Conversation

vweevers
Copy link
Member

@vweevers vweevers commented Mar 24, 2019

Counterpart of prebuild/prebuildify#27. Major.

index.js Outdated Show resolved Hide resolved
@mafintosh
Copy link
Collaborator

Looking really good! See my one comment

@vweevers vweevers moved this from Todo to Review in Home Prebuilders Association Apr 25, 2019
@vweevers vweevers added the semver-major Changes that break backward compatibility label Apr 25, 2019
if (a.runtime !== b.runtime) {
return a.runtime === runtime ? -1 : 1
} else if (a.abi !== b.abi) {
return a.abi ? -1 : 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vweevers Mind explaining this a bit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to pick a prebuild that most closely matches the runtime (environment).

By this point in the code, we have already filtered out prebuilds with non-matching tags. But let's say the current runtime is Electron. There could still be:

  1. A prebuild specifically targeting Electron
  2. A runtime-agnostic prebuild (suitable for both Node and Electron)

If (1) exists, it should sort first and win. We're assuming that if (1) exists, it must mean that (2), though agnostic for most runtimes, is not suitable for this specific runtime.

The logic is the same for the ABI's. At this point in the code, we could have:

  1. A prebuild specifically targeting the current ABI
  2. An "ABI-agnostic" prebuild (i.e. N-API)

If (1) exists, it should sort first and win.

@vweevers vweevers merged commit 0db392c into master Apr 26, 2019
Home Prebuilders Association automation moved this from Review to Done Apr 26, 2019
@vweevers vweevers deleted the new-naming-scheme branch April 26, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Changes that break backward compatibility
Development

Successfully merging this pull request may close these issues.

None yet

3 participants