nyx-space / anise

ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of the NAIF SPICE toolkit.
Mozilla Public License 2.0
68 stars 14 forks source link

0.4.2 (Build.rs) causes cargo docs to fail to build #289

Closed gwbres closed 3 months ago

gwbres commented 3 months ago

Hello,

we're having an unfortunate and unpredictible little issue. What happens on line 31 in the Build.rs script prevents to generate the documentation of any library that depends on ANISE 0.4.2. Apparently because this runs inside a docker without write permission. Build failure log example. We have two options

Consequence

ChristopherRabotin commented 3 months ago

Hello,

I have noticed this issue too in the tests in CI. The crux of the problem is that sometimes, the request to download the files from the public storage server fails. That server is a static server running on the Google Cloud Storage, and I have no idea why it would fail. When it happens in ci, I can just rerun the test, but it's very frustrating.

I'll look more into it, but at this stage, I really have no leads as to why Google won't server the files quickly and reliably.

gwbres commented 3 months ago

hum, weird. As far as CI/CD goes, we can always re-run, but I understand, we tend to have heavy libraries here, and the process is quite lengthy. The problem is we cannot re-run the official docs. Maybe we should simply define in the ANISE metadata, to never document with the embed_ephem, and we're good to go. All we need is to disable the "all-features" option that is probably active

ChristopherRabotin commented 3 months ago

Oh, you're entirely right. I had misread the error. Yes, I think that by simply not building the documentation with embed_ephem, then it'll fix the read only error. This is different from the error I have seen too often than I would hope.

gwbres commented 3 months ago

You said the error might be induced by gnss-rtk, but if that is the case, then I totally do not understand. I'm able to build the docs for this crate myself, IMO the issue is solely related to the job that crates.io dockerizes. And the issues apparently only happen since we introduced the embed_ephem feature and because that job is deployed with said feature being active

ChristopherRabotin commented 3 months ago

Both are true : the issue is when the docs are being built on crates.io and when the embed ephem feature is enabled. For the anise crate, the feature is not turned on by default, which is why building the docs on crates.io does not cause a problem.

I don't know if the metadata changes you're proposing will fix the build issue when the embed ephem feature is enabled, or if the change only affects the build of the docs for the anise crate.