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

refactor: use thiserror instead of anyhow #410

Closed
wants to merge 2 commits into from

Conversation

ematipico
Copy link

@ematipico ematipico commented Jul 9, 2024

Closes #409

@ematipico
Copy link
Author

ematipico commented Jul 9, 2024

Could you please run the CI for me? Unfortunately, I can't run the tests internally because some source code requires rustic nightly for some features, which I don't have installed (the contribution guide doesn't say anything about it).

@morgante
Copy link
Contributor

morgante commented Jul 9, 2024

Unfortunately looks like tests are failing. @ematipico Do you have more info on the rustic failure you're seeing? That wasn't a deliberate decision.

@ematipico
Copy link
Author

ematipico commented Jul 9, 2024

Sure. I've had a couple of issues:

  • The absence of rust-toolchain.toml; hence it wasn't possible to pin the version of the toolchain of the project (it was probably using my local version, which was outdated). I solved the issue, locally.
  • This is the compiler error I get when running the tests:
     error[E0554]: `#![feature]` may not be used on the stable release channel
       --> /Users/ema/.cargo/registry/src/index.crates.io-6f17d22bba15001f/io-extras-0.18.1/src/lib.rs:19:33
        |
     19 | #![cfg_attr(can_vector, feature(can_vector))]
        |                                 ^^^^^^^^^^
     
     error[E0554]: `#![feature]` may not be used on the stable release channel
       --> /Users/ema/.cargo/registry/src/index.crates.io-6f17d22bba15001f/io-extras-0.18.1/src/lib.rs:20:41
        |
     20 | #![cfg_attr(write_all_vectored, feature(write_all_vectored))]
        |                                         ^^^^^^^^^^^^^^^^^^
    

@arendjr
Copy link
Contributor

arendjr commented Jul 16, 2024

So if I understand correctly it’s because the io-extras crate depends on nightly? Maybe there’s a suitable alternative for it?

@ematipico
Copy link
Author

So if I understand correctly it’s because the io-extras crate depends on nightly? Maybe there’s a suitable alternative for it?

I really don't know, to be honest. This is a dependency that is pulled by a feature called external_functions, which is part of the default features

@ematipico
Copy link
Author

Any help @morgante ?

@morgante
Copy link
Contributor

@ematipico I'm not sure about the root cause - do you want me to take over cleaning up this PR?

@ematipico
Copy link
Author

The issue is caused by the feature external_functions, which pulls io-extras , which uses nightly features. Is it expected?

By disabling that feature, I can run tests and run clippy. Can move forward with the PR, but I realised there's more work to do, especially in other crates.

I will commit my changes so you can evaluate the entity of the changes.

@ematipico
Copy link
Author

Hey @morgante, unfortunately the error occurred again and I can't compile the project. Not sure why.

Feel free to take over the PR whenever you want

@morgante
Copy link
Contributor

morgante commented Aug 9, 2024

Continued in #453

@morgante morgante closed this Aug 9, 2024
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.

Request to change anyhow to thiserror (or custom error) in grit-pattern-matcher
3 participants