-
Notifications
You must be signed in to change notification settings - Fork 239
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
Rework documentation generation functionality of xtask
#3026
base: main
Are you sure you want to change the base?
Conversation
For esp-alloc I get
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
Running `target/debug/xtask build-documentation --packages=esp-alloc`
[2025-01-24T12:45:53Z WARN xtask] Package 'esp-alloc' does not have chip features, ignoring argument
[2025-01-24T12:45:53Z INFO xtask] Building 'esp-alloc' documentation
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
Generated /Users/jesse/Work/esp-hal/esp-alloc/target/doc/esp_alloc/index.html 🤔 |
Works for me, too |
ok - updated and use nightly and now it works 🤷♂️ |
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.
Thanks
For me, build-index gives a nebulous "Error: The system cannot find the path specified. (os error 3)" when I don't specify and packages, which doesn't really tell me why it failed. Also, calling it for esp-alloc,esp-hal,esp-wifi I get an index that only has esp-hal. |
That at least worked for me 🤷♂️ |
Not sure, Works On My System™️ 🤷🏻♂️ Potentially a Windows-related issue, but seems it works for Bjoern so again, no idea.
Since we're moving to our own self-hosted documentation server everything doesn't need to be namespaced under Works as expected for me, i.e. ➜ esp-hal git:(feature/docs) ✗ ll docs/esp-alloc/0.6.0
total 40
-rw-r--r--@ 1 jesse staff 73B Jan 24 13:49 crates.js
drwxr-xr-x@ 15 jesse staff 480B Jan 24 09:14 esp_alloc
-rw-r--r--@ 1 jesse staff 2.8K Jan 24 13:49 help.html
-rw-r--r--@ 1 jesse staff 2.4K Jan 24 13:49 search-index.js
drwxr-xr-x@ 3 jesse staff 96B Jan 24 09:14 search.desc
-rw-r--r--@ 1 jesse staff 2.7K Jan 24 13:49 settings.html
drwxr-xr-x@ 3 jesse staff 96B Jan 24 09:14 src
-rw-r--r--@ 1 jesse staff 144B Jan 24 13:49 src-files.js
drwxr-xr-x@ 32 jesse staff 1.0K Jan 24 13:49 static.files
drwxr-xr-x@ 4 jesse staff 128B Jan 24 09:14 trait.impl
➜ esp-hal git:(feature/docs) ✗ ll docs/esp-hal/0.23.1
total 32
-rw-r--r--@ 1 jesse staff 11K Jan 16 13:06 esp-rs.svg
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:14 esp32
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:14 esp32c2
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:14 esp32c3
drwxr-xr-x@ 51 jesse staff 1.6K Jan 24 09:15 esp32c6
drwxr-xr-x@ 51 jesse staff 1.6K Jan 24 09:15 esp32h2
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32s2
drwxr-xr-x@ 56 jesse staff 1.8K Jan 24 09:15 esp32s3
-rw-r--r--@ 1 jesse staff 3.9K Jan 24 10:30 index.html
➜ esp-hal git:(feature/docs) ✗ ll docs/esp-wifi/0.12.0
total 32
-rw-r--r--@ 1 jesse staff 11K Jan 16 13:06 esp-rs.svg
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32c2
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32c3
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32c6
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32h2
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32s2
drwxr-xr-x@ 14 jesse staff 448B Jan 24 09:15 esp32s3
-rw-r--r--@ 1 jesse staff 3.9K Jan 24 10:30 index.html |
I believe this happens if you don't build the docs first, or delete the |
I'm sure it's a me-issue, but:
After building hal/wifi docs, and index, I don't have a |
Yes this is intentional. I discussed adding this with @MabezDev but we are not sure what other information will be included other than just listing the packages, so I have left it for a future PR. |
So what does |
This will be the first or 2 or 3 PRs for #2967.
We can now generate documentation for self-hosting for all packages in the repository, and generate the indexes for those packages which require them (i.e.
esp-hal
,esp-lp-hal
,esp-wifi
):Each package will have its documentation generated, and for those which have API differences depending on which chip features is enabled, we will generate docs for each specific chip. Otherwise, just a single version is generated.
There's probably still some room for improvement here, but given that it's just automation I didn't spend too much time refining it. Happy to make any changes if requested, though.
I will still need to rework the
documentation.yml
workflow to publish to the Espressif documentation server, but need to figure that all out still (and get deployment credentials for the production server), so that will be handled separately.