-
Notifications
You must be signed in to change notification settings - Fork 6
QPM 2 PoC #64
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
Open
Fernthedev
wants to merge
121
commits into
main
Choose a base branch
from
qpm2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
QPM 2 PoC #64
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Bump versions for keyring, rustc-demangle, and rustls packages. - Add triplet handling in package creation and editing commands. - Introduce QPkg command for managing QPKG operations. - Refactor manifest generation to utilize triplet data. - Clean up unused code and improve error handling in publish command.
…riplet to restore
* Update packages * Minor fixes * feat: add quest_emu feature and command integration - Updated Cargo.toml to include the quest_emu feature as a default option. - Added quest_emu dependency from its GitHub repository. * Update quest_emu * fix: update quest_emu source reference to latest commit * Update to allow apk download fuzzy matching
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
QPM 2
Notable changes
Shared QPM JSON
The Shared QPM JSON is now exclusively a locked dependency mechanism. It is no longer used to store information for consumers of the package.
Furthermore, it will no longer be used to retrieve information that is stored in
qpm2.json. This means you no longer have to restore to see changes applied.Triplets
QPM 2 introduces triplets, a notion where a package can be customized into different flavors so to speak. Some examples of this are
debug,staticorheaderOnlybut alsocurlorureqflavor of a package. Ideally they allow a package author to offer various versions of a package to consumers. An example of this would bebeatsaber-hookofferingunity2019,unity2021,unity2022,unity6versions of itself.Additionally, every package must contain a
defaulttriplet, where every other triplet inherits the triplet's values. Arrays and objects are also merged.Environment values
Environment is a dictionary of keys and values where dependencies can offer information for consumers. Examples of this would be
bs-cordloffering game id and version for usage in scripts or qmod.Examples of this are:
${QPM_PACKAGE_ID}${QPM_PACKAGE_VERSION}${QPM_ACTIVE_TRIPLET}${QPM_QMOD_GAME_ID}${QPM_QMOD_GAME_VERSION}Environment variables are all prefixed
QPMto ensure they don't abuse the existing environment variables maliciously.For example,
QMOD_GAME_IDin aqpm.jsonwould be used asQPM_QMOD_GAME_ID.QPKG
Packages would no longer use Git or zips for installation. Rather, they would use
qpkg, a renamed zip file that contains info of its headers, binaries and package. This streamlines lots of headaches related to QPM usinggitsuch as the git branching and versioning while also allowing one to download QPKGs from URLs (ideally for testing without releasing).cargo installwould now require a path or URL to install a QPKG from.Building with triplets in mind
As triplets can each have their own set of dependencies, qmod and configuration, it changes the traditional way we looked at building packages. A QPKG must be able to store binaries of every triplet possible.
Therefore,
qpm buildnow exists and will do the following to build your package:qpm s buildqpm qmod zipif necessaryextern/build/{triplet}Publishing QPKG
Since there is no longer Git involved in the publish process, it becomes much simpler. The hardest part is configuring the qmod links and the QPKG itself with the necessary configuration. For making the QPKG, QPM now offers
qpm qpkgwhich will grab every binary inextern/build/{triplet}and the shared headers and configure the QPKG.Once that is done, one must store the QPKG somewhere online and offer a direct download link to the QPKG. With that done, running
qpm publish {qpkg_url}will publish your package toqpackages.com, allowing restore.Compatibility with QPM 1
There will be no backwards compatibility with QPM 1. While many commands remain the same, the fundamental changes make it very hard to consider backwards compatibility. Therefore, a new registry and config directory is used to allow QPM 1 and QPM 2 to co-exist.
This also means that to allow this, many files related to qpm are now referred to as
qpm2e.gqpm2.json,qpm2.shared.jsonetc. to allow a package to continue serving QPM 1 users for whatever need be.Migration
A migration Deno script is offered to allow easier migration to QPM 2. It assumes that the QPM 1 package only contains one triplet, which would be the
defaulttriplet.