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

Add support for ParchmentJAM for migrating mapping data #23

Merged
merged 4 commits into from
Aug 5, 2023

Conversation

sciwhiz12
Copy link
Member

@sciwhiz12 sciwhiz12 commented Jul 1, 2023

This PR implements integration with JAMMER/JarAwareMapping in Compass, through the Parchment-specific integration application https://github.com/ParchmentMC/ParchmentJAM, which will resolve #19.

Testing this PR

Aside from configuring your Parchment repository to use this PR (preferrably, via includeBuild in the pluginManagement section of your settings.gradle1), the following should be in the buildscript (either as part of other existing sections, or just copy-pasted at the very bottom):

dependencies {
    // ParchmentJAM, JAMMER integration for migrating mapping data 
    jammer 'org.parchmentmc.jam:jam-parchment:0.1.0'
}

compass {
    migration {
        targetVersion = '1.19.4' // Assuming the current version is 1.20.1
    }
}

You can determine if the migration system has been configured properly if the console output shows the path of versions which will be taken during migration (Setting up migration for the following versions in order: [...]), and the migrateData task is visible under the parchment group.

Some notes

  • Yes, the target version can either be forwards or backwards of the current version.

  • The final data is placed into the staging data environment (staging folder), and not directly into the production data environment (data folder). This allows the user a chance to determine changes between the new data and the old data, and make manual modifications if necessary.

    Once the user is satisfied with the changes (or this is run in automation), the promoteStagingToProduction task can be executed to move the data from staging to production.

  • The migration can also be configured with the migration-targetVersion and migration-excludedVersion (comma-separated values) project properties.


Remaining work:

  • Add more documentation to the migration configuration extension, and other classes.
  • Allow configuring the migration options via project properties or environment variables.

Footnotes

  1. For example, assuming that this PR is cloned to a directory Compass adjacent to your mappings repository, add the line includeBuild('../Compass') under the pluginManagement block of your mapping repository's settings.gradle file. Upon invoking Gradle (or refreshing your IDE's Gradle integration), you should see mentions of the Compass repository in the console output.

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Jul 1, 2023
@Lanse505
Copy link
Member

Lanse505 commented Jul 1, 2023

Looks like Crap!
Rated: 18/3.17
Additional Notes: Not enough Bananas

sciwhiz12 added 3 commits July 2, 2023 02:34
Properties for the migration configuration are prefixed with
"migration-".
The second call to Property#convention would always override the first
call.
@sciwhiz12 sciwhiz12 marked this pull request as ready for review July 1, 2023 19:08
Copy link
Member Author

@sciwhiz12 sciwhiz12 left a comment

Choose a reason for hiding this comment

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

Nothing pops out to me after -- checks timestamps -- a month of not looking at this code, and a quick test migration from 1.20.1 to 21w31a shows no visible explosions.

@sciwhiz12 sciwhiz12 merged commit 4b6928f into dev Aug 5, 2023
@sciwhiz12 sciwhiz12 deleted the sci/parchmentjam branch August 5, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate JAMMER for use in porting across MC versions
2 participants