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

Build failure caused by #[deny(warnings)] #70

Closed
pluiedev opened this issue May 8, 2024 · 6 comments
Closed

Build failure caused by #[deny(warnings)] #70

pluiedev opened this issue May 8, 2024 · 6 comments
Assignees

Comments

@pluiedev
Copy link

pluiedev commented May 8, 2024

Pretty self-explanatory:

    Checking fontfor v0.4.2 (/home/leah/coding/fontfor)
error: fields `left` and `top` are never read
  --> src/rasterizer/bitmap.rs:23:9
   |
22 | pub struct Metrics {
   |            ------- fields in this struct
23 |     pub left: usize,
   |         ^^^^
24 |     pub top: usize,
   |         ^^^
   |
note: the lint level is defined here
  --> src/main.rs:20:9
   |
20 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: could not compile `fontfor` (bin "fontfor") due to 1 previous error

Please consider setting up some sort of CI system if you'd like to use #[deny(warnings)], so that this kind of problem gets caught before it gets into someone else's CI (in my case, NixOS's Hydra, which produces a build log like this).

@7sDream
Copy link
Owner

7sDream commented May 8, 2024

Will fix this and add a normal build step in daily CI.

But because of this tool is almostly done and not active enough, Github daily CI will automatic stop running after serval month.

So I guss I can just remove this lint in code and enable it only in CI step.

Thanks for the report anyway.

@7sDream 7sDream self-assigned this May 8, 2024
@7sDream
Copy link
Owner

7sDream commented May 9, 2024

@pluiedev Can you give some infomation about which version of Rust you are using?

I just tried compile on my Windows/Linux machine with latest stable Rust and it seems there is no warning be reported.

And the reborn CI seems also has no complaints about this code.

@pluiedev
Copy link
Author

pluiedev commented May 9, 2024

@pluiedev Can you give some infomation about which version of Rust you are using?

I just tried compile on my Windows/Linux machine with latest stable Rust and it seems there is no warning be reported.

And the reborn CI seems also has no complaints about this code.

I'm using 1.80.0 nightly, 2024-05-01, and I can still reproduce the issue on my own computer.

@7sDream
Copy link
Owner

7sDream commented May 9, 2024

Nightly is just not a compiler version I want to support, cuz its behavior can change from day to day.
But I added beta channel in daily lint CI, hope this can capture errors before stable release comes out.

And only deny warnings in CI is a nice change anyway, so it's done. Maybe you can try compile again in master branch.

BTW, the compile failed in the build log you linked is caused by #69, and already fixed in 0.4.2. So update source code version in nixpkg may also fix it.

@pluiedev
Copy link
Author

pluiedev commented May 9, 2024

It compiles on latest commit now, thanks! Will update to 0.4.3 directly once that is out

@pluiedev pluiedev closed this as completed May 9, 2024
@7sDream
Copy link
Owner

7sDream commented May 10, 2024

Just released 0.4.3, FYI

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