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

Implement the [registries] and [registry] tables #8

Merged
merged 16 commits into from
Mar 7, 2023

Conversation

yottalogical
Copy link
Contributor

@yottalogical yottalogical commented Mar 4, 2023

  • [registries] table
  • [registry] table

I've done my best to stay consistent with the design, structure, and style of the code so far, but let me know if there's anything I could polish up!

This adds the url crate as a dependency, since registry indices are specified as URLs. If you want to avoid this added dependency, we could use a String instead.

For security purposes, I did not add the ability to read any data in any credentials.toml or credentials files. It will help ensure that users of this library won't read and/or send sensitive data somewhere accidentally. If in the future you make it so this library can read from those files, then I recommend you make it an opt-in sort of thing.

@yottalogical
Copy link
Contributor Author

yottalogical commented Mar 4, 2023

Do we also want to include the registries.crates-io.protocol value? Right now it's only on Nightly.

Copy link
Contributor Author

@yottalogical yottalogical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct here? It seems like it would make the definition be the environmental variable with the prefix and suffix stripped off rather than the full thing.

Here I have it implemented such that it's consistent with line 36. Later I fix it so that it includes the full environmental variable. Which is preferred?

src/env.rs Outdated Show resolved Hide resolved
src/env.rs Outdated Show resolved Hide resolved
@yottalogical yottalogical marked this pull request as ready for review March 4, 2023 23:50
Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This looks great!


Do we also want to include the registries.crates-io.protocol value? Right now it's only on Nightly.

That field is not yet available in the current stable, but it would make sense to support it anyway since it has been stabilized and AFAIK there is no plan to revert the stabilization.

Is this correct here? It seems like it would make the definition be the environmental variable with the prefix and suffix stripped off rather than the full thing.

The current one in the main branch is incorrect. Thanks for fixing this.

src/env.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/de.rs Outdated Show resolved Hide resolved
src/de.rs Outdated Show resolved Hide resolved
src/easy.rs Outdated Show resolved Hide resolved
src/easy.rs Outdated Show resolved Hide resolved
@yottalogical
Copy link
Contributor Author

As of commit d97ce4e, this PR passes cargo-semver-checks.

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@taiki-e taiki-e merged commit c082146 into taiki-e:main Mar 7, 2023
@taiki-e
Copy link
Owner

taiki-e commented Mar 7, 2023

Published in v0.1.6.

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.

2 participants