Rust container/python version needs to be updated #1
Zack T Hankin opened 2 months ago

Error from needing the 2024 edition flag.

10:45:08 Running step "build and test"...
10:45:10 1.0.3: Pulling from 1dev/rust
10:45:10 Digest: sha256:8622745a0b14dc8f8078e6f128e9a2ace896564440b44ff050fca4a65ca5f91f
10:45:10 Status: Image is up to date for 1dev/rust:1.0.3
10:45:10 error: process didn't exit successfully: `/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo metadata --format-version=1 --no-deps --manifest-path /onedev-build/workspace/Cargo.toml` (exit status: 101)
10:45:10 --- stderr
10:45:10 error: failed to parse manifest at `/onedev-build/workspace/Cargo.toml`
10:45:10 
10:45:10 Caused by:
10:45:10   feature `edition2024` is required
10:45:10 
10:45:10   The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.81.0 (2dbb1af80 2024-08-20)).
10:45:10   Consider trying a newer version of Cargo (this may require the nightly release).
10:45:10   See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.```
  • Zack T Hankin commented 2 months ago

    added a rustup update into build and test step and it fixes bug

      set -e
    + rustup update
    
      # Set CARGO_HOME to cache folder so that downloaded artifacts can be populated there. Note that we cannot cache '/root/.cargo' directly as cache folder will be mounted from an empty folder initially
      export CARGO_HOME=/root/.cache/cargo
      mkdir -p .config
      cat << EOF > .config/nextest.toml
      [profile.default.junit]
      path = "test-result.xml"
      store-success-output = true
      store-failure-output = true
      EOF
      cargo llvm-cov nextest --lcov --output-path lcov.info
      lcov_cobertura lcov.info -o coverage.xml
      # cargo clippy --message-format=json > check-result.json
    
      # Make sure all files inside $CARGO_HOME is accessible by OneDev outside of container for cache upload
      chmod -R o+r $CARGO_HOME
    
  • Robin Shen commented 2 months ago

    Image rebuilt with latest cargo version and this issue should have been addressed. The new release will be available in next major release of OneDev to be released early next month.

  • Robin Shen changed state to 'Closed' 2 months ago
    Previous Value Current Value
    Open
    Closed
  • Zack T Hankin commented 2 months ago

    Legend thanks @robin

1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
1.0.3
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/docker/rust#1
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover