Skip to content
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

Both normalize_doc_attributes and wrap_comments require an unstable toolchain #843

Open
ghost opened this issue Jun 25, 2024 · 2 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 25, 2024

The formatting options used by the cargo install version (https://github.com/oxidecomputer/progenitor/blob/main/cargo-progenitor/src/main.rs#L94) use formatting options that are documented as unstable:

RUST_BACKTRACE=1 cargo progenitor -i api-definition.yml -o output -n output -v 0.1.0
-----------------------------------------------------
 TYPE SPACE
-----------------------------------------------------
....
-----------------------------------------------------

thread 'main' panicked at /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-progenitor-0.7.0/src/main.rs:101:68:
called `Result::unwrap()` on an `Err` value: Unstable("wrap_comments, normalize_doc_attributes")
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: cargo_progenitor::reformat_code
   4: cargo_progenitor::main
@ahl
Copy link
Collaborator

ahl commented Jun 25, 2024

Yeah: I'm pretty unhappy with the choice I made here... and with the options available. I'd like to use rustfmt for formatting so that the generated code could pastt cargo fmt... but it's not feasible to use it as a library and shelling out has many problems--including the one you've noted. At this point, I'm inclined to switch everything over to prettyplease and see if that's a better experience. PRs welcome or I'll try to get to it in the next week or two.

@rgreinho
Copy link

rgreinho commented Dec 6, 2024

Is there a way to disable these formatting options?

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

No branches or pull requests

2 participants