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

Deliberate conflict marker #90

Open
Earthcomputer opened this issue Jul 30, 2024 · 2 comments
Open

Deliberate conflict marker #90

Earthcomputer opened this issue Jul 30, 2024 · 2 comments

Comments

@Earthcomputer
Copy link
Contributor

Add an annotation (say, @Conflict), that can be added to an injector to mark it as conflicting with other injectors that target the same instruction. This tells MixinExtras to fail the injection in this case.

This has the following advantages:

  • Ability to explicitly conflict with other injectors in cases where this is not currently possible (e.g. with injection points that can only be used on non-conflicting injectors)
  • Clarifies the intention that the injector should be conflicting
    • This makes it easier for tools such as mcdev to know if a conflicting injector is intentional.
  • Possibility for future expansion of scope (e.g. conflicting under certain conditions)
@LlamaLad7
Copy link
Owner

Would it cause conflicts only with other injectors marked as Conflicting?

@Earthcomputer
Copy link
Contributor Author

My idea was to conflict with any injector which targets the same instruction, regardless of what that other injector is or how it's annotated. But more complicated options could certainly be added to the annotation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants