-
Notifications
You must be signed in to change notification settings - Fork 54
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
Generator doesn't generate method consistently #501
Comments
More info: in this case, I have to use jar2xml because of #464. And the method goes missing right from the start in the api.xml |
Does the java version change between builds? |
Java version? If you mean the .jar file I am binding, then no. If you are talking the actual java.exe, then this is on CI, so it shouldn't be changing. The version numbers appear to be the same in the binlogs... |
Are you using |
Just found another library that is missing a few methods. Trying to bind: I see the @JvmStatic
@NotNull
public static final CacheControl parse(@NotNull Headers headers) {
return Companion.parse(headers);
} It is totally missing from the api.xml. One thing that I notice is that it is a BUT! It is there in the api.xml.class-parse! I have zipped up both files: apis.zip Looking closer, I think the
That type is part of a binding dll, but the jar is not embedded - not sure if that makes a difference. |
Then because the |
I added the missing types into the binding and the headers appeared again. Waiting on this PR and then everyone will get all their types: xamarin/XamarinComponents#718 Just an FYI for those following along: #371 |
I think this is a duplicate of #543, which is fixed for 16.5. Feel free to reopen if this re-occurs. |
I am not sure where the issue lies - or even what this issue really is. I have noticed that sometimes the generator skips a single method. Just one - sometimes.
I am binding the Kotlin stdlib, so this may be something to do with Kotlin's generated Java code. But, this only happens sometimes, and a rebuild usually corrects it. Not just a /t:rebuild, but a trigger CI again type of rebuild.
The PR that I notice this on is: xamarin/XamarinComponents#678. I am using cake, but I believe the effective command line for MSBuild is:
Nothing too special, but the build is not consistent. For some reason, on some builds, a single method is missing:
This method does exist when I decompile the jar, and it looks to be pretty simple. There is a neighbor method that is the same with two extra
int
parameters and that is always generated.I have several builds that are the same commit, but have just that method missing:
This build is a new commit, but I also zip up the obj folders:
A new commit:
I have no idea what is really going on here since the way machines work is that if the same input is provided to the same machine, the output must be the same - even if it is wrong.
There is one thing that I noticed that MAY be related. I have a Kotlin/Java tool that I run after the API XML is generated to create a Transforms xml file to rename various Kotlin-isms (#464) This tool used to work fine and I have released a few bindings already. But suddenly, it started giving errors that Kotlin could not locate members. All I was doing was using Java reflection to load a member, and then using Kotlin to get the Kotlin version so I could read metadata. This was also not consistent - some builds passed, then some gave errors. You can actually see this in my first PR.
But that is not all. I eventually just merged as is with a rule to skip that ONE member that wouldn't be consistent: xamarin/XamarinComponents#689 (comment)
The text was updated successfully, but these errors were encountered: