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

Update cargo manifest (dependencies and formatting) + dependabot #748

Closed

Conversation

Mathieu-Lala
Copy link
Contributor

Summary of changes

Changed

  • in Cargo.tomls, specify the compete version of the dependencies (see this article)
  • in Cargo.tomls, use the workspace notation when relevant
  • for all dependencies, explicitly use default-features = false and list the features used
  • bump syn to >=2, and update the implementation accordingly
  • bump package.edition to 2021

Style

Fixed

Added

  • dependabot files with weekly update on cargo and github actions dependencies udpate

@Mathieu-Lala
Copy link
Contributor Author

Mathieu-Lala commented Jul 27, 2023

I realized afterward that is use features higher than MSRV (1.61.0). The required version would be 1.64.

@schungx
Copy link
Collaborator

schungx commented Jul 27, 2023

I'd try to avoid excessive formatting changes... that makes it difficult to tell where the changes actually reside.

Also, I see some changes to path.xxx into path().xxx... can you elaborate?

@Mathieu-Lala
Copy link
Contributor Author

Mathieu-Lala commented Jul 27, 2023

Also, I see some changes to path.xxx into path().xxx... can you elaborate?

I bumped syn to version 2.
syn::Attribute::path went private, and there is a method to access to this field.
https://docs.rs/syn/2.0.27/syn/struct.Attribute.html#method.path
https://docs.rs/syn/1.0.109/syn/struct.Attribute.html#structfield.path

@schungx
Copy link
Collaborator

schungx commented Jul 27, 2023

Actually, I have found the minimum versions that compile and run tests successfully:

[dependencies]
smallvec = { version = "1.7.0", default-features = false, features = ["union", "const_new", "const_generics"] }
ahash = { version = "0.8.2", default-features = false, features = ["compile-time-rng"] }
num-traits = { version = "0.2.0", default-features = false }
once_cell = { version = "1.7.0", default-features = false, features = ["race"] }
bitflags = { version = "2.0.0", default-features = false }
smartstring = { version = "1.0.0", default-features = false }
rhai_codegen = { version = "1.5.0", path = "codegen", default-features = false }

no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", version = "0.4.1", default-features = false, features = ["alloc"], optional = true }
libm = { version = "0.2.0", default-features = false, optional = true }
hashbrown = { version = "0.13.1", optional = true }
core-error = { version = "0.0.0", default-features = false, features = ["alloc"], optional = true }
serde = { version = "1.0.96", default-features = false, features = ["derive", "alloc"], optional = true }
serde_json = { version = "1.0.45", default-features = false, features = ["alloc"], optional = true }
unicode-xid = { version = "0.2.0", default-features = false, optional = true }
rust_decimal = { version = "1.16.0", default-features = false, features = ["maths"], optional = true }
getrandom = { version = "0.2.0", optional = true }
rustyline = { version = "11.0.0", optional = true }
document-features = { version = "0.2.0", optional = true }

[dev-dependencies]
rmp-serde = "1.1.0"
serde_json = { version = "1.0.45", default-features = false, features = ["alloc"] }

@schungx
Copy link
Collaborator

schungx commented Jul 27, 2023

I would much rather set a minimum workable version, and let the user bump to higher if he/she wants.

@schungx
Copy link
Collaborator

schungx commented Aug 3, 2023

@Mathieu-Lala why don't I do this: I'll update Cargo.toml with the set of minimal versions first, then let's see what else needs to add.

@Mathieu-Lala
Copy link
Contributor Author

Sure! Sorry I didn't have time to complete and fix this PR.
I believe not all the changes are interesting, I will let you cherry pick 👍 .

@schungx
Copy link
Collaborator

schungx commented Sep 6, 2023

Closing this for now, as the new version will adhere to recommended style by citing the minimum versions of dependencies.

@schungx schungx closed this Sep 6, 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.

None yet

2 participants