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

support dependencies across multiple namespaces #91

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
tags: ['[0-9]*']
tags: ["[0-9]*"]
pull_request:
branches:
- main
Expand All @@ -16,14 +16,14 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup default stable
shell: bash
- name: Run all tests
run: cargo test --all
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup default stable
shell: bash
- name: Run all tests
run: cargo test --all

check:
name: Check feature combinations
Expand All @@ -32,29 +32,27 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup default stable
shell: bash
- name: Build without default features
run: cargo check --no-default-features
- name: Build the `wat` feature
run: cargo check --no-default-features --features wat
- name: Build the `wit` feature
run: cargo check --no-default-features --features wit
- name: Build the `registry` feature
run: cargo check --no-default-features --features registry
- name: Build all features
run: cargo check --all-features
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup default stable
shell: bash
- name: Build without default features
run: cargo check --no-default-features
- name: Build the `wat` feature
run: cargo check --no-default-features --features wat
- name: Build the `wit` feature
run: cargo check --no-default-features --features wit
- name: Build all features
run: cargo check --all-features

rustfmt:
name: Format source code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- name: Run `cargo fmt`
run: cargo fmt -- --check
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- name: Run `cargo fmt`
run: cargo fmt -- --check
68 changes: 41 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ thiserror = { workspace = true }
indexmap = { workspace = true }
miette = { workspace = true, features = ["fancy"] }
semver = { workspace = true }
indicatif = { workspace = true, optional = true }
indicatif = { workspace = true }
warg-client = { workspace = true }
dialoguer = "0.11.0"

[features]
default = ["wit"]
wat = ["wac-resolver/wat"]
wit = ["wac-resolver/wit"]
registry = ["wac-resolver/registry", "indicatif"]

[workspace.dependencies]
wac-parser = { path = "crates/wac-parser", version = "0.1.0", default-features = false }
Expand Down Expand Up @@ -71,11 +72,11 @@ wat = "1.202.0"
logos = "0.14.0"
miette = "7.2.0"
thiserror = "1.0.58"
warg-client = "0.4.1"
warg-protocol = "0.4.1"
warg-crypto = "0.4.1"
warg-server = "0.4.1"
warg-credentials = "0.4.1"
warg-protocol = { git = "https://github.com/bytecodealliance/registry", branch = "namespace-enhancements" }
warg-crypto = { git = "https://github.com/bytecodealliance/registry", branch = "namespace-enhancements" }
warg-client = { git = "https://github.com/bytecodealliance/registry", branch = "namespace-enhancements" }
warg-credentials = { git = "https://github.com/bytecodealliance/registry", branch = "namespace-enhancements" }
warg-server = { git = "https://github.com/bytecodealliance/registry", branch = "namespace-enhancements" }
secrecy = "0.8.0"
futures = "0.3.30"
indicatif = "0.17.8"
Expand Down
19 changes: 10 additions & 9 deletions crates/wac-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ indexmap = { workspace = true }
wat = { workspace = true, optional = true }
wit-parser = { workspace = true, optional = true }
miette = { workspace = true }
warg-client = { workspace = true, optional = true }
warg-protocol = { workspace = true, optional = true }
warg-crypto = { workspace = true, optional = true }
warg-credentials = { workspace = true, optional = true }
secrecy = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
warg-client = { workspace = true }
warg-protocol = { workspace = true }
warg-crypto = { workspace = true }
warg-credentials = { workspace = true }
secrecy = { workspace = true }
tokio = { workspace = true }
futures = { workspace = true }
serde_json = "1.0.116"

[dev-dependencies]
wac-graph = { workspace = true }
Expand All @@ -38,7 +39,7 @@ tokio-util = "0.7.10"
tempdir = "0.3.7"

[features]
default = ["registry"]
default = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unless it makes it harder to implement, I'd rather we leave the registry feature in in this PR. We can discuss it's removal either in an issue or in a PR specific to its removal.

wat = ["dep:wat"]
wit = ["wit-parser"]
registry = ["warg-client", "warg-protocol", "warg-crypto", "warg-credentials", "secrecy", "tokio", "futures"]

Loading
Loading