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

cargo-typify: 0.0.14 -> 0.1.0 #333558

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Conversation

david-r-cox
Copy link
Member

@david-r-cox david-r-cox commented Aug 9, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@david-r-cox
Copy link
Member Author

Result of nixpkgs-review pr 333558 run on x86_64-linux 1

1 package built:
  • cargo-typify

1 similar comment
@lucasew
Copy link
Contributor

lucasew commented Aug 10, 2024

Result of nixpkgs-review pr 333558 run on x86_64-linux 1

1 package built:
  • cargo-typify

@lucasew
Copy link
Contributor

lucasew commented Aug 10, 2024

IDK if that's expected

Error:                                                                    
0: Failed to convert JSON Schema to Rust code                          
1: Failed to format Rust code                                          
2: rustfmt is not installed                                                                                                                Location:                                                                 
cargo-typify/src/lib.rs:179

@pbsbot
Copy link

pbsbot commented Aug 11, 2024

Result of nixpkgs-review pr 333558 run on x86_64-linux 1

1 package built:
  • cargo-typify

@pbsds
Copy link
Member

pbsds commented Aug 11, 2024

fixes https://hydra.nixos.org/build/259477117

IDK if that's expected

Looks like you don't have rustfmt in PATH. You could wrap cargo-typify to make it more hermetic, or not and save the rebuilds. Your call mr maintainer :)

@david-r-cox
Copy link
Member Author

Good catch @lucasew. I wrapped it like @pbsds suggested and it appears to be fixed.

As a quick test, here's a Dockerfile that doesn't include rustfmt and successfully runs cargo-typify:

FROM nixos/nix:2.24.2
RUN mkdir -p /root/.config/nix && \
    echo "experimental-features = nix-command flakes" > /root/.config/nix/nix.conf
RUN curl -O https://raw.githubusercontent.com/oxidecomputer/typify/01f3e269a01b5eda87663bd5b162304bb306ad5b/example.json
RUN nix run github:integrated-reasoning/nixpkgs/cargo-typify#cargo-typify typify ./example.json  && \
    cat example.rs

@david-r-cox
Copy link
Member Author

Result of nixpkgs-review pr 333558 run on x86_64-linux 1

1 package built:
  • cargo-typify

1 similar comment
@pbsbot
Copy link

pbsbot commented Aug 16, 2024

Result of nixpkgs-review pr 333558 run on x86_64-linux 1

1 package built:
  • cargo-typify

@pbsds pbsds merged commit 17d91fd into NixOS:master Aug 16, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants