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

Implements basic local and remote sources support #17

Merged
merged 10 commits into from
Jun 8, 2024

Conversation

erikreinert
Copy link
Member

@erikreinert erikreinert commented Jun 8, 2024

Changes

  • support for local (compressed and normal files)
  • support for git sources (local and remote)
  • support for http sources (compressed and normal)

- Updated `example/rust/vorpal.rs` to include a new example for building from a local compressed file.
- Changed the name of the existing example from "example-source" to "example-local-directory".
- Modified `src/service/proxy/package/mod.rs` to simplify the call to `store::unpack_source` by removing unnecessary conversion to `PathBuf`.
…ample

Renamed the package from "example-local-directory" to "example-rust" for better clarity. Removed the example of a local compressed file package to streamline the code and reduce redundancy.
…rocess

- Added new dependencies in Cargo.toml and Cargo.lock including `futures-util`, `git2`, `reqwest`, `tokio-stream`, `url`, and others.
- Updated `PackageService` to handle streaming `PrepareRequest`.
- Modified `prepare` function to handle different source types (Git, HTTP, Local) and prepare the source accordingly.
- Implemented `prepare_source` function to sign and send source data in chunks.
- Updated `build` function to handle new source preparation and build process.
- Renamed `vorpal.rs` to `build.rs` and updated its content to reflect new build process.
- Updated `flake.nix` to include new dependencies and build inputs.
- Refactored store module functions to use consistent naming and paths.
- Added new functions in notary module for signing data.
- Updated service modules to use new store path functions and handle new build process.
- Improved error handling and logging throughout the codebase.
Simplified the error handling in the build preparation module by using the `map_err` method for more concise and readable code. Removed redundant error logging statements. This change improves code maintainability and readability.
@erikreinert erikreinert self-assigned this Jun 8, 2024
- Added `rust-overlay` input to `flake.nix` and `flake.lock`.
- Included `cargo-udeps` in the list of inherited packages.
- Updated `devShells` to include `cargo-udeps` in `nativeBuildInputs`.
- Configured `rust-overlay` to follow `nixpkgs`.
- Added `cargo-nightly` application to `process-compose` configuration.
- Renamed `build.rs` to `vorpal.rs` in `example/rust` directory.
- Updated `Cargo.toml` to reflect the new binary name and path.
- Modified `flake.nix` to include `clippy` and `rustfmt` in `nativeBuildInputs`.
- Replaced `.clone()` with dereferencing in `src/command/mod.rs`.
- Simplified function calls by removing unnecessary references in `src/notary/mod.rs`, `src/service/build/build/mod.rs`, `src/service/build/prepare/mod.rs`, `src/service/proxy/package/mod.rs`, and `src/store/mod.rs`.
- Improved code readability by using shorthand syntax for increment operations and string concatenations.
- Renamed `build/mod.rs` to `run_build.rs`
- Renamed `prepare/mod.rs` to `run_prepare.rs`
- Renamed `build/sandbox_default.rs` to `sandbox_default.rs`
- Updated `service.rs` to use new module names
- Simplified build script generation in `run_build.rs`
- Removed redundant error logging in `run_build.rs`
- Changed function parameters from `String` to `&str` in `proxy/package/mod.rs` and `store/mod.rs`
- Added unit tests for store directory paths in `store/mod.rs`
- Updated `flake.nix` to include clippy checks and tests in the build phase and removed clippy from devShells.
- Updated `checkPhase` in `flake.nix` to include `cargo fmt --check --verbose` and modified `cargo test` command to use `--locked --all-features --all-targets`.
- Added `rustfmt` to `nativeBuildInputs` in `flake.nix`.
- Removed `rustfmt` from `devShells.default.nativeBuildInputs` in `flake.nix`.
- Removed `cargo-nightly` app configuration from `apps` in `flake.nix`.
- Simplified the creation of `PrepareResponse` in `run_prepare.rs`.
- Bump `addr2line` from 0.21.0 to 0.22.0
- Bump `anstyle-query` from 1.0.3 to 1.1.0
- Bump `hyper` from 0.14.28 to 0.14.29
- Bump `backtrace` from 0.3.71 to 0.3.72
- Bump `cc` from 1.0.98 to 1.0.99
- Bump `clap` from 4.5.4 to 4.5.6
- Bump `clap_builder` from 4.5.2 to 4.5.6
- Bump `clap_derive` from 4.5.4 to 4.5.5
- Bump `clap_lex` from 0.7.0 to 0.7.1
- Bump `gimli` from 0.28.1 to 0.29.0
- Bump `object` from 0.32.2 to 0.35.0
- Bump `proc-macro2` from 1.0.84 to 1.0.85
- Bump `tar` from 0.4.40 to 0.4.41
- Bump `tokio` from 1.37.0 to 1.38.0
- Bump `tokio-macros` from 2.2.0 to 2.3.0
- Bump `utf8parse` from 0.2.1 to 0.2.2

Remove `cargo-udeps` from `flake.nix` and update `cargoSha256`.
@erikreinert erikreinert merged commit fb0705b into main Jun 8, 2024
2 checks passed
@erikreinert erikreinert deleted the 10-support-remote-source-urls branch June 8, 2024 19:49
@erikreinert erikreinert added this to the 0.1.0 milestone Jan 3, 2025
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.

1 participant