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

feat(service): get rid of cargo dependency #922

Merged
merged 44 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ba211f3
feat: reimplement is_next, is_alpha, ensure_bin, ensure_cdylib, and c…
iamwacko May 15, 2023
ebb9c3b
Merge branch 'shuttle-hq:main' into remove_cargo
iamwacko May 15, 2023
85a1106
fix: fmt
iamwacko May 15, 2023
a173d4b
fix: clippy errors
iamwacko May 15, 2023
0146dcb
fix: change an error to satisfy a test
iamwacko May 15, 2023
8c581db
fix: cargo is_lib and cargo_metadata is_lib are different
iamwacko May 16, 2023
18b805a
chore: cargo fmt
iamwacko May 16, 2023
eb0a469
feat: add compiler function to replace cargo, removed cargo
iamwacko May 18, 2023
ea7566c
fix: satisfied clippy, removed unused code
iamwacko May 18, 2023
ee486de
fix: current dir is located earlier
iamwacko May 18, 2023
315097c
fix: cwd moved back again
iamwacko May 18, 2023
f1fc9ab
fix: use workspace root instead of current_directory()
iamwacko May 18, 2023
50c5ac6
fix: use project_directory instead of current_directory or root
iamwacko May 18, 2023
ce07665
fix: more working directory
iamwacko May 18, 2023
50b6a71
fix: working directory finally works
iamwacko May 18, 2023
89169e2
feat: 1 job failed panic when the Shuttle runtime is missing is now m…
iamwacko May 18, 2023
726156b
fix: use oneshot instead of pipe, remove debug print, check if manife…
iamwacko May 19, 2023
6bbe48d
fix: add .await
iamwacko May 19, 2023
de2f506
fix: remove unecessary clone
iamwacko May 19, 2023
4993d25
docs: change comment
iamwacko May 19, 2023
087315f
Merge branch 'main' into remove_cargo
iamwacko May 19, 2023
4da6e56
feat: limit the job number only with deployment
iamwacko May 30, 2023
075ff5a
feat: make functions async
iamwacko May 30, 2023
0fd44b9
feat: remove now unecessary pipes
iamwacko May 30, 2023
98dd1e9
fix: cargo fmt
iamwacko May 30, 2023
401d4e8
Merge branch 'main' into remove_cargo
iamwacko May 30, 2023
2995f64
fix: typo in merge conflict resolution
iamwacko May 30, 2023
1840364
feat: return exit code and error with cargo clean failure
iamwacko May 30, 2023
0a2d4ef
fix: cargo fmt
iamwacko May 30, 2023
8a2e116
feat: deployment boolean added
iamwacko May 31, 2023
3863f8c
fix: moved process to service
iamwacko May 31, 2023
7365e01
feat: add stderr and stdout output
iamwacko Jun 4, 2023
516b2fc
feat: refactored the log outputting to be a bit nicer
iamwacko Jun 4, 2023
9f23c11
fix: cargo fmt
iamwacko Jun 4, 2023
e85fd99
fix: stop errors
iamwacko Jun 4, 2023
fb13456
Merge branch 'main' into remove_cargo
iamwacko Jun 4, 2023
bef9e17
feat: use BufReader instead of weirdness
iamwacko Jun 4, 2023
acf9ba6
feat: remove pipe
iamwacko Jun 4, 2023
b556eeb
Merge branch 'main' into remove_cargo
iulianbarbu Jun 5, 2023
cdfacfa
fix: replace - with _ for files
iamwacko Jun 5, 2023
84cea55
fix: replace string with char
iamwacko Jun 5, 2023
2107827
fix: clippy single_char_pattern
iamwacko Jun 6, 2023
7b47000
fix: underscore thing only happens to libs
iamwacko Jun 6, 2023
03a297d
fix: trigger ci, it works locally
iamwacko Jun 6, 2023
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
669 changes: 17 additions & 652 deletions Cargo.lock
oddgrd marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ base64 = "0.13.1"
bollard = "0.14.0"
bytes = "1.3.0"
cap-std = "1.0.2"
cargo = "0.69.0"
cargo_metadata = "0.15.3"
chrono = { version = "0.4.23", default-features = false }
clap = { version = "4.0.27", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion cargo-shuttle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ impl Shuttle {
);

// Compile all the alpha or shuttle-next services in the workspace.
build_workspace(working_directory, run_args.release, tx).await
build_workspace(working_directory, run_args.release, tx, false).await
}

async fn setup_local_provisioner(
Expand Down
2 changes: 1 addition & 1 deletion deployer/src/deployment/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ async fn build_deployment(
project_path: &Path,
tx: crossbeam_channel::Sender<Message>,
) -> Result<BuiltService> {
let runtimes = build_workspace(project_path, true, tx)
let runtimes = build_workspace(project_path, true, tx, true)
.await
.map_err(|e| Error::Build(e.into()))?;

Expand Down
2 changes: 1 addition & 1 deletion deployer/src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ pub async fn clean_project(
.service_build_path(&project_name)
.map_err(anyhow::Error::new)?;

let lines = clean_crate(&project_path, true)?;
let lines = clean_crate(&project_path, true).await?;

Ok(Json(lines))
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/tests/integration/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub async fn spawn_runtime(project_path: String, service_name: &str) -> Result<T
let runtime_address = SocketAddr::new(Ipv4Addr::LOCALHOST.into(), runtime_port);

let (tx, _) = crossbeam_channel::unbounded();
let runtimes = build_workspace(Path::new(&project_path), false, tx).await?;
let runtimes = build_workspace(Path::new(&project_path), false, tx, false).await?;

let secrets: HashMap<String, String> = Default::default();

Expand Down
14 changes: 3 additions & 11 deletions service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ doctest = false
[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
cargo = { workspace = true, optional = true }
cargo_metadata = { workspace = true, optional = true }
crossbeam-channel = { workspace = true, optional = true }
os_pipe = "1.1.4"
pipe = { workspace = true, optional = true }
iamwacko marked this conversation as resolved.
Show resolved Hide resolved
serde = { workspace = true, features = ["derive"] }
strfmt = "0.2.2"
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"], optional = true }
tokio = { workspace = true, features = ["sync", "process"], optional = true }
toml = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }

Expand All @@ -39,12 +39,4 @@ tokio = { workspace = true, features = ["macros", "rt"] }
default = ["codegen"]

codegen = ["shuttle-codegen/frameworks"]
builder = [
"cargo",
"cargo_metadata",
"crossbeam-channel",
"pipe",
"tokio",
"toml",
"tracing",
]
builder = ["cargo_metadata", "crossbeam-channel", "pipe", "tokio", "toml", "tracing"]
Loading