-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Update gir: Use docsrs attribute #1078
Conversation
The sys crates has to be updated as well https://github.com/gtk-rs/gtk-rs-core/blob/master/pango/sys/build.rs |
Everything is up to date as far as I can tell. The word "dox" doesn't appear anywhere in the code anymore, but the problem with the CI seems to be that actions-rs does not pick up env variables which are now necessary for RUSTCFLAGS... I'm trying rust-toolchain now instead, which is better anyway because actions-rs is not maintained anymore. Let's see if that works. |
Seems like I needed Still a pango job is still failing, but only because |
For doc build, no native C libraries should be required so that it can build (somewhat) on docs.rs. Is that what you mean? |
The problem with pango is that upstream didn't bump the release to say 1.51 when adding APIs that are expected to land as part of 1.52 so we are a bit stuck. The solution would be to open an issue upstream asking them to bump the api version to 1.51 for now or we could just test with v1_50 only for now. |
Btw. to sort out the remaining issues, I'm waiting for gtk-rs/gir#1457 to land. This would be the only proper solution for the problem. |
Yes, makes sense to me. That will just require updating a lot of conditions in manual code too here now. The gir PR is merged in any case. @bilelmoussaoui You'll have to update in gtk4-rs too. |
Am I wrong or was this logic flawed? https://github.com/gtk-rs/gtk-rs-core/blob/master/gio/src/socket.rs#L880-L914 I think it should have been |
No that seems correct to me. When generating docs it is defining fallback types for the ones in std as those only exist either on Windows or on UNIXy platforms. |
Ok that makes sense. It looked like dead code to me, but if it's about a fallback for documentation, it sounds reasonable. It's still very unlikely that someone uses something that's neither Unix nor Windows for building docs, but at least I matched the old behavior with the latest commit. |
I would say this should be ready now, but given the large size of the PR and how much code it touches (even if it's mostly the same stuff) I would like to get better feedback from the CI. Should I just temporarily disable the pango test case so the rest of the crates gets proper testing? |
As I mentioned, you can build it with v1_50 instead? |
We can always fix pango upstream but as the maintainer is away for a few days, i guess it can't happen anytime soon |
That's not the reason. If you build on Windows you don't have UNIXy APIs in std, if you build on Linux you don't have Windows APIs in std. For that reason the Windows APIs are defined when building docs on Linux and vice-versa. |
pango should be fixed once https://gitlab.gnome.org/GNOME/pango/-/merge_requests/691 lands |
pango PR got merged, #1087 is the only missing piece. |
@bilelmoussaoui You rebase this one? |
I guess not :) I've rebased this one now. Let's see if the CI passes this time. |
Ah I can't
@AaronErhardt your job then :) |
@bilelmoussaoui Still fails :) |
Everything except "docs embed check" seems to work now. Not sure why that one fails though. |
Are the changes in For example I would have expected Looks like the features are not independent from the docsrs attribute (gtk-rs/gir#1457). The lines where I have my doubts can quickly be found by searching for |
@pentamassiv I think you are correct. There were so many attributes that needed to be changed because the dox feature was used heavily and often with some additional logic. This makes it likely that there were a couple of oversights from my side, like those you pointed out. |
No worries, I just wanted to ask in case I misunderstood something. If you'd like, I can create a PR to fix those leftovers |
That'd be great! |
Follow-up of gtk-rs/gir#1455
Unfortunately, this change affects quite a lot of files, but most changes are very similar.