-
Notifications
You must be signed in to change notification settings - Fork 215
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
0.2.7 refactors #178
0.2.7 refactors #178
Conversation
Ok, I have something mostly working (not tested a lot, inner classes dont work for example). I have been testing with the following file:
Loom remaps this and places it in META-INF of the jar:
The format is still wide open for changes, im already not sure on forcing tabs as my ide sometimes changes them to tabs. |
Why not accept any amount of whitespace as a seperator? |
Ok, done that for now, Im still not super happy with the file format. Right now there are no limits on what you can make public, people seem undecided on allowing methods/fields to only be protected. |
Code cleanup Remap if needed when reading
switch (split[1]) { | ||
case "class": | ||
if (split.length != 3) { | ||
throw new RuntimeException("Failed to parse access escalator. at line:" + line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of aborting immediately, I'd add the encountered errors to a list and continue trying to parse the file, then abort after it's done, that way you can see all the errors at once (and on top of that you don't get a completely irrelevant stack trace except for the message)
I'd also make the error more descriptive, something like
syntax error: expected '<class name> <access level>' after 'class'
at /path/to/inputfile.txt:40:
|
40 | class sdas as das das d asd as
| ^~~~~~~~~~~~~~~~~~~~~~~~
Same goes for all the other parse errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can easily make the erros more descriptive, im not sure if its worth the effort to go to make it super detailed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it doesn't have to be this detailed, one line error messages would definitely be enough, the main thing I would want is that it doesn't immediately throw when it encounters the first error.
Updated file format:
Tabs are required, it will complain quite quickly if you use spaces. |
…and will benefit idea 2020 Add some basic validation to the AccessWidenerRemapper, will present any issues with the mappings when building (May need a way to disable?) + Some bugs fixes
Im going to move out the AccessWinder stuff into another PR, as my reactors should be good enough for 0.2.7 even without them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No obvious issues
Access changer should be ok as we don't recompile decompiled code like the other silly project does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No major problems
This PR contains a bit of cleanup to loom, as well as almost drop in support for access winders, and fixes for idea 2020.
This has the abbility to generate project based jars.