-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tiny readers crash when encountering trailing empty destination name columns #22
Comments
The spec doesn't actually say what values these 'optional' entries are to have. And the JVMS does not allow for empty names. As such throwing an error is a valid option here. However that's not what happens which is what I consider a bug. Tho I don't have any validation on the mapped entries being valid bytecode mappings. So that's a whole other feature i would have to add and I don't care to right now. However again your test case doesn't actually exemplify the issue your stack shows.
Which is indeed invalid. More specifically, your stack trace shows you used spaces instead of tabs as your delimitator. Anyways as for the 'optional' entries. I will just have it propagate the last seen value. Would be nice if when they added this 'optional' system they specified what it meant. Oh well. Edit: Actually doing more looking into this the spec now conflicts with itself. Or at least the interpretation you're trying to say. Specifically real world examples of parameter names. Which often times are empty strings when omitted. What names should we use for those? Edit: Ya I'm not gunna change this until you cite your sources as this being the 'indented' behavior. |
Hmm, depending on interpretation, that's implied by
Oops, somehow I copied the wrong snippet from the mapping file again, sorry. It's fixed now.
Yes, but your example misses the trailing tab at the end of the line.
That's not the case, I think you're just misinterpreting as my reproduction case was wrong.
As noted above, it has to be the corresponding source name, that's how all the Fabric (= first-party) tooling handles it. Regarding parameter names, if both the source name and a destination name are empty, that's simply a result of |
Show me the practice.
No, it's not that's the point you can only get that error if you DO NOT have tabs at the end of your line. As the only test is that there are enough entries in the array to fill in the names. Not that the names are non-empty.
No i'm not, you can literally copy/paste your error message and see it has two spaces instead of tabs.
Show your citation. As it's clearly not in the spec.
According to the spec that could be interpreted in many ways. It would be better to have it actually specified and documented somewhere before I make the call for SRGUtils. |
If a mapping's destination name in a given namespace is equivalent to the source name, the Tiny formats allow to omit the relevant column's content (leading to two or more consecutive tabs, or trailing tabs at the end of the line). Example:
The effective target names are:
srcNs
:class1
dstNs1
:class1Rename
dstNs2
:class1
Currently though, SrgUtils's readers crash with the following exceptions respectively:
It also seems like the line numbers are off by one (line 1 contains to the headers, not the class definitions).
The text was updated successfully, but these errors were encountered: