Skip to content

Fix docs.rs build for rustpython-parser - #4437

Merged
youknowone merged 1 commit into
RustPython:mainfrom
not-my-profile:fix-parser-docs.rs
Jan 12, 2023
Merged

youknowone merged 1 commit into
RustPython:mainfrom
not-my-profile:fix-parser-docs.rs

Conversation

@not-my-profile

Copy link
Copy Markdown
Contributor

docs.rs failed to build the documentation of the recently released rustpython-parser 0.2.0 because the build.rs script couldn't write the parser.rs file because docs.rs builds the documentation in a sandbox with a read-only filesystem.

This commit fixes this by writing the parser.rs file to the cargo output directory instead, as recommended by the docs.rs documentation.1

Fixes #4436.

docs.rs failed to build the documentation of the recently released
rustpython-parser 0.2.0 because the build.rs script couldn't write the
parser.rs file because docs.rs builds the documentation in a sandbox
with a read-only filesystem.

This commit fixes this by writing the parser.rs file to the cargo output
directory instead, as recommended by the docs.rs documentation.[1]

Fixes RustPython#4436.

[1]: https://docs.rs/about/builds#read-only-directories

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Comment thread compiler/parser/build.rs
// We are not using lalrpop::process_root() or Configuration::process_current_dir()
// because of https://github.com/lalrpop/lalrpop/issues/699.
lalrpop::Configuration::new()
.use_cargo_dir_conventions()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, this is the way to do things.

@youknowone
youknowone merged commit 9bbe745 into RustPython:main Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs.rs cannot generate the documentation for rustpython-parser

2 participants