Comments (3)
how many instructions we would want to overwrite
This on its own makes this utterly no-go. There are plans for block replacement injections which would address this use case, however the implementation of these is quite complicated and needs to be tackled alone.
If you want to do ASM-y things, write a transformer and do them with ASM, but the aim of mixins is and always will be to completely decouple transformations from having to understand bytecode. InjectionPoints already come too close to the line really but there's no other way and they're also fail-safe in that a bad declaration will only lead to a failure to inject or at worst injecting in the wrong place, and will never corrupt the actual target.
This type of thing has been discussed over and over and I have not rejected block injections in any way, shape or form. However, I absolutely will not allow some half-baked, shortcut approach. It'll be done and done well, or not done at all.
I'm planning to add this myself, but I figured I would see if there was some strong opposition before I got started with this.
Since this is something of a personal project I'd much prefer that pull requests be restricted to bug fixes or simple changes, entirely new features are not what I'm looking for.
from mixin.
If you wish to think of this as a personal project that's fine. But it's still part of the larger SpongeProject, which I'm perfectly capable of contributing to, don't attack my ability as a developer. Closing something without any active discourse on IRC or through the issue beside a brief explanation is not fair to progress. My plan to work on this is because having one person (you) do all the work causes it to stall when you're busy or unavailable.
The normal number of instructions to overwrite is one, just like @Inject has a by specifier, this would need a similar extendable variable.
If there are plans for block replacement injections, that is what this is, it seems inappropriate to put that in @Inject which has extra code to prevent accidental (or purposeful) overwriting.
Please discuss further on IRC.
from mixin.
It's been extensively discussed, we were even discussing it last night. Happy to discuss more but you're not on IRC right now. I didn't close this issue without discussion because the wider issue is invalid, but because this specific issue you've proposed is invalid and doesn't really need any further discussion.
The normal number of instructions to overwrite is one, just like @Inject has a by specifier, this would need a similar extendable variable.
To clarify: @Inject
does not replace any code, the "normal number of instructions to overwrite" is actually zero that's why it's "safe". It's designed to be completely stack- and local- neutral. The thing you're proposing is not stack/local-neutral and does not fit with the @Inject
model at all.
Whilst Sponge is using this project, it's still a very personal project for me and that doesn't say anything about your capability as developer or anything like that, so don't take it as an attack because it's not meant as one in the slightest.
Happy to discuss on IRC when you get online.
from mixin.
Related Issues (20)
- `Accessor` and `Invoker` Mixins delete methods with the same name in the target class
- java.lang.NoClassDefFoundError: org/spongepowered/asm/synthetic/args/Args$1 HOT 1
- [Feature Request] Inject goto instructuion
- [Forge][Build error] Using class from custom lib in Mixin class throw Exception
- `MappingWriterTSrg` is named incorrectly
- Thread: Render thread Suspected Mod: Patchouli (patchouli), Version: 1.20.1-83-FORGE HOT 1
- Allow `@ModifyVariable` to capture locals HOT 1
- Mixins Not Being Read, Force Disabling Them. Game Crashes. HOT 1
- Trying to add another 'case' value to a 'switch' statement
- injection failed HOT 1
- INVOKE_ASSIGN gets stopped by CHECKCASTs HOT 2
- Wiki Subsection Titles
- [Forge] Stack Overflow when a invoked method is called HOT 1
- Support ModLauncher loaded as JPMS Module / Classes-Folder
- Initializer merging behavior seems to have changed in 0.8.6 snapshots HOT 1
- Constructor redirect incorrectly handles nested constructor invocations
- Redirect can not find its target. HOT 4
- Inability to get all classes targetted by mixin HOT 6
- Modpack Server Crash HOT 1
- When you log in it shows this HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixin.