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

extra proposal context #245

Merged
merged 30 commits into from
Jan 6, 2025
Merged

Conversation

ix0rai
Copy link
Member

@ix0rai ix0rai commented Dec 8, 2024

based on #240, required for QuiltMC/quilt-mappings#660

  • adds the context of an Enigma object for both proposal methods
    • EntryRemapper now exposes an Enigma to facilitate this
  • adds new readMappings API in Enigma
  • replaces NameProposalService#bypassValidation with a validateProposedMapping method that can be overridden to achieve the same effect
    • this also fixes dynamic proposed names not receiving this validation
      • which will break plugins that abuse that oversight. such as enigma's builtin plugin (i had to fix it). this is now unit tested oops
  • improve unit testing to account for bugfixes

@ix0rai ix0rai added enhancement New feature or request backend affects the enigma backend labels Dec 8, 2024
@ix0rai ix0rai changed the base branch from master to develop/2.6 December 17, 2024 01:08
…l-context

# Conflicts:
#	enigma/src/main/java/org/quiltmc/enigma/api/service/NameProposalService.java
#	enigma/src/test/java/org/quiltmc/enigma/name_proposal/TestFallbackNameProposal.java
#	enigma/src/test/java/org/quiltmc/enigma/name_proposal/TestNameProposalBypassValidation.java
#	enigma/src/testFixtures/java/org/quiltmc/enigma/test/plugin/TestEnigmaPlugin.java
@ix0rai ix0rai requested a review from IotaBread December 31, 2024 02:09
Copy link
Member

@IotaBread IotaBread left a comment

Choose a reason for hiding this comment

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

looks great!

@ix0rai ix0rai merged commit 85d50c9 into QuiltMC:develop/2.6 Jan 6, 2025
2 checks passed
@ix0rai ix0rai mentioned this pull request Jan 6, 2025
ix0rai added a commit that referenced this pull request Jan 9, 2025
* add methods and start work on tests

* actually use that method oops

* implement bypassValidation()

* implement fallback for stats

* checkstyle tests

* store a full `EntryMapping` in `TranslateResult`

* add highlighting for fallback mappings

* fix crash with trailing commas in profile json

* add test proposer for fallback
- fix highlighting
- only propose names for the first parameter of each method in test:parameters

* orange!

* good looking colors for fallback

* checkstyle

* checkstyle

* rethrow exceptions in tests

* add enigma instance as name proposal context

* fix dynamic proposal not accounting for unchecked

* fix dynamic proposal putting obf mappings in the wrong tree

* checkstyle

* forgot javadoc for fallback

* add readMappings api methods in Enigma

* rework name validation

* remove bypassValidation, add dynamic test

* improve validation testing

* checkstyle

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend affects the enigma backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants