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

Improve Rust manifest API #17

Open
Tpt opened this issue Jan 26, 2023 · 0 comments
Open

Improve Rust manifest API #17

Tpt opened this issue Jan 26, 2023 · 0 comments
Labels
only: kraken-std This issue affects only kraken-std.

Comments

@Tpt
Copy link
Contributor

Tpt commented Jan 26, 2023

The kraken.hs.cargo.manifest module provides two datasources:

  • The plain Cargo.toml file parsed into data structures (CargoManifest, Workspace, Package, Dependencies, Workspace, WorkspacePackage)
  • The output of cargo metadata (CargoMetadata, WorkspaceMember, Artifact, Bin and Lib)

It presents multiple shotcomings imho:

  • There is no way from a class name to know if it's from the plain Cargo.toml or from cargo metadata.
  • The CargoMetadata datastructure looses information, for example the relation between WorkspaceMember and Artifact.

Proposal:

  1. Create a new kraken.hs.cargo.metadata module presenting all data from cargo metadata version 1 and migrate all read-only usages from it.
  2. Drop cargo metadata datastructures from kraken.hs.cargo.manifest
  3. Simplify Cargo.toml representation (for example walking between the different crates of the same workspace might be done using cargo metadata)
@NiklasRosenstein NiklasRosenstein transferred this issue from another repository May 15, 2023
@NiklasRosenstein NiklasRosenstein added the only: kraken-std This issue affects only kraken-std. label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
only: kraken-std This issue affects only kraken-std.
Projects
Status: No status
Development

No branches or pull requests

2 participants