-
Notifications
You must be signed in to change notification settings - Fork 538
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
No need to parse JavaDoc in class-parse anymore. #982
Conversation
Marking DO-NOT-MERGE until we merge dotnet/java-interop#200 |
9249b4e
to
ddcc7a4
Compare
Shouldn't |
Not only because it is about ANDROID API and not generic Java related, but also it has no relationship with the build process. Xamarin organization should fork the repo under its own though (but whoever can do that never actually did importing repos not matter how important it is and I asked so often). |
OK, so it shouldn't be in Java.Interop.
I assume this means that you believe I don't understand the rationale. Cross-module bumps are annoying; I don't feel a need to potentially make things worse. |
ddcc7a4
to
769ddd6
Compare
b354ec4
to
065c903
Compare
I removed do-not-merge and am re-adding it again because I'd rather switch xamarin-android-docimporter-ng reference to the one in dotnet/java-interop#208. |
8706cbc
to
d4ec4e3
Compare
It's all good now. |
else \ | ||
$(RUN_CLASS_PARSE) $(ANDROID_JAR) -docspath=$(DOCS_DIR_CUR_LEVEL)/reference --docstype=droiddoc2 > $(CLASS_PARSE_XML) || rm -f $(CLASS_PARSE_XML) ;\ | ||
fi | ||
$(RUN_CLASS_PARSE) $(ANDROID_JAR) -platform=$(LEVEL) -parameters-description=../../src/Mono.Android/Profiles/api-$(LEVEL).params.txt > $(CLASS_PARSE_XML) || rm -f $(CLASS_PARSE_XML) |
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.
Should this use --parameter-names
?
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.
It turned out that your hack to detect documentation type is buggy. I'm going to create another PR to fix it.
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.
|
d4ec4e3
to
2d40699
Compare
indeed! Removed it. |
2d40699
to
f7f31a6
Compare
…212) Context: dotnet/android#982 The `api-*.params.txt` files within [xamarin-android PR #982][pr982] start with a blank line. Unfortunately, the `JavaDocletType.JavaApiParameterNamesXml` detection logic didn't support leading blank lines, which prevented the `api-*.params.txt` files from being properly detected. [pr982]: dotnet/android#982 Remove all leading and trailing whitespace from `rawXML` so that we support leading blank lines.
672a49a
to
aa535e0
Compare
API regressions should be fixed by dotnet/java-interop#215. Technically it is not mandatory (as I pushed regenerated api-*.xml. in with the fixed class-parse) but it's nice to have the PR merged first and we bump java.interop within this change. |
0b0ed59
to
cc1f015
Compare
HUH? Why does it have conflicts?? |
build |
cc1f015
to
a8f382f
Compare
Use pre-generated parameter names description instead. They can be generated at external/xamarin-android-docimporter-ng/ Soon we will be able to delete src/Mono.Android/Profiles/api*.xml.in. So far, build-tools/api-xml-adjuster is updated to take these params.txt and generate api-*.xml.in. It is now done within a few minutes.
a8f382f
to
f934174
Compare
@@ -17373,7 +17373,7 @@ | |||
</parameter> | |||
</method> | |||
<method abstract="false" deprecated="not deprecated" final="false" name="writeNewStateDescription" native="false" return="void" static="false" synchronized="false" visibility="public"> | |||
<parameter name="fd" type="android.os.ParcelFileDescriptor"> | |||
<parameter name="p0" type="android.os.ParcelFileDescriptor"> |
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'm assuming that we don't need to care about these "parameter name 'regressions'" because the api-25.params.txt
has the correct parameter name?
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.
Yup, api-25.params.txt
contains:
class FileBackupHelperBase
writeNewStateDescription(android.os.ParcelFileDescriptor fd)
I don't understand how this all fits together. :-( (Which is problematic when I'm attempting to rewrite the commit message to state how this all fits together...) For starters, this is about That part I understand. Additionally, the new What I don't understand is how this PR works, specifically around the altered Thus, how is it that this PR can change parameter names in e.g. ...and I think I have an answer: Meaning I don't see the breakage I fear I'll see because we're not building enough to see it. |
build |
I added the full-mono-integration-build label and rebuilt, so that all API levels would be built. This should allow us to see if the changes to ...and if they're not meaningful, why aren't they meaningful? (I suspect they are meaningful.) |
Sigh. Why should api-27.xml.in even matter while it is never part of build? It is due to buggy MSBuild targets design:
|
Anyways api-27.xml.in must not matter because it is actually generated with api-27.params.txt, not from classic DroidDoc parser. That's why there was no change. |
I'm looking at
What magic is this? Yet...they're not? Where are the parameter names coming from? |
We do ignore those p0, p1... names. https://github.com/xamarin/xamarin-android/blob/master/build-tools/api-merge/ApiDescription.cs#L173 |
I think I explained why those differences occur: parameter name metadata from bytecode contains parameter names from method definitions from the corresponding definitions from non-public base class. In Java sources the derived classes of course don't contain those methods declared in the non-public base classes and therefore no parameter names are given. |
Ah! I'd forgotten that! |
Use pre-generated parameter names description instead.
They can be generated at external/xamarin-android-docimporter-ng/
Soon we will be able to delete src/Mono.Android/Profiles/api*.xml.in.
So far, build-tools/api-xml-adjuster is updated to take these params.txt
and generate api-*.xml.in. It is now done within a few minutes.