svd icon indicating copy to clipboard operation
svd copied to clipboard

reenable cmsis tests

Open burrbull opened this issue 3 years ago • 7 comments

Done:

  • include_str replaced with reading from file due to big RAM usage at compile time.

Todo:

  • SiliconLabs dir too big and passes tests. Should be blacklisted.
  • Decide what to do with failed tests.

cc @Emilgardis

burrbull avatar Dec 26 '22 09:12 burrbull

Removed git submodules as it blocks using this repository as cargo git dependency.

I'm not sure I understand, how does the submodule block this?

Emilgardis avatar Dec 26 '22 15:12 Emilgardis

Removed git submodules as it blocks using this repository as cargo git dependency.

I'm not sure I understand, how does the submodule block this?

It freezes on cargo update. I don't know why.

burrbull avatar Dec 26 '22 15:12 burrbull

Interesting!

Definitely something funky happening

svd-submodule on  master [?] is 📦 v0.1.0 via 🦀 v1.66.0 
❯ rm -rf ~/.cargo/git/checkouts


svd-submodule on  master [?] is 📦 v0.1.0 via 🦀 v1.66.0 
❯ CARGO_UNSTABLE_SPARSE_REGISTRY=true CARGO_LOG=debug cargo +nightly check
[2022-12-26T15:17:52Z DEBUG cargo::core::workspace] find_members - only me as a member
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] adding rustup info to rustc fingerprint
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] different compiler, creating new rustc info cache
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] rustc info cache miss
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro -Csplit-debuginfo=packed`
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] rustc info cache miss
[2022-12-26T15:17:52Z DEBUG cargo::util::rustc] running `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg`
[2022-12-26T15:17:52Z DEBUG cargo::util::config::target] Got all targets {}
[2022-12-26T15:17:52Z DEBUG cargo::ops::resolve] avoid_patch_ids={}
[2022-12-26T15:17:52Z DEBUG cargo::ops::resolve] poisoning https://github.com/rust-embedded/svd because svd-submodule v0.1.0 (/Users/emil/workspace/dev_space/svd-submodule) looks like it changed svd-parser
[2022-12-26T15:17:52Z DEBUG cargo::ops::resolve] attempting to prefer svd-submodule v0.1.0 (/Users/emil/workspace/dev_space/svd-submodule)
[2022-12-26T15:17:52Z DEBUG cargo::core::registry] load/locked   /Users/emil/workspace/dev_space/svd-submodule
[2022-12-26T15:17:52Z DEBUG cargo::core::resolver] initial activation: svd-submodule v0.1.0 (/Users/emil/workspace/dev_space/svd-submodule)
[2022-12-26T15:17:52Z DEBUG cargo::core::registry] load/missing  https://github.com/rust-embedded/svd
[2022-12-26T15:17:52Z DEBUG cargo::core::registry] loading source https://github.com/rust-embedded/svd
[2022-12-26T15:17:52Z DEBUG cargo::sources::config] loading: https://github.com/rust-embedded/svd
    Updating git repository `https://github.com/rust-embedded/svd`
[2022-12-26T15:17:52Z DEBUG cargo::sources::git::utils] attempting GitHub fast path for https://api.github.com/repos/rust-embedded/svd/commits/HEAD
[2022-12-26T15:17:53Z INFO  cargo::sources::git::utils] reset /Users/emil/.cargo/git/checkouts/svd-77e357c269d3ae92/8ee1f61/.git/ to 8ee1f614a5b3a3043870643b9b0d344313d27525
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] doing reset
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] reset done
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] update submodules for: "/Users/emil/.cargo/git/checkouts/svd-77e357c269d3ae92/8ee1f61/"
    Updating git submodule `git://github.com/posborne/cmsis-svd.git`
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] attempting GitHub fast path for https://api.github.com/repos/posborne/cmsis-svd/commits/e5db2387d9c48359c9c5229a5bb436cf2ed5381f
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] skipping gc as there's only 0 pack files
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] doing a fetch for git://github.com/posborne/cmsis-svd.git
[2022-12-26T15:17:53Z DEBUG cargo::sources::git::utils] initiating fetch of ["+e5db2387d9c48359c9c5229a5bb436cf2ed5381f:refs/commit/e5db2387d9c48359c9c5229a5bb436cf2ed5381f"] from git://github.com/posborne/cmsis-svd.git
[2022-12-26T15:19:08Z DEBUG cargo::sources::git::utils] fetch failed: failed to connect to github.com: Operation timed out; class=Os (2)
warning: spurious network error (2 tries remaining): failed to connect to github.com: Operation timed out; class=Os (2)
[2022-12-26T15:19:08Z DEBUG cargo::sources::git::utils] initiating fetch of ["+e5db2387d9c48359c9c5229a5bb436cf2ed5381f:refs/commit/e5db2387d9c48359c9c5229a5bb436cf2ed5381f"] from git://github.com/posborne/cmsis-svd.git
^C

Emilgardis avatar Dec 26 '22 15:12 Emilgardis

I can't get any submodule command to work on the master branch, had to manually reset the module and then bump the index (also changed from ssh to https). I think the issue is solved with this.

Try,

svd-parser = {git = "https://github.com/emilgardis/svd", branch = "master-cmsis-updated"}

Emilgardis avatar Dec 26 '22 15:12 Emilgardis

This would probably also present itself in ci if we did checkout as

  - uses: actions/checkout@v3
    with:
      submodules: recursive

Emilgardis avatar Dec 26 '22 15:12 Emilgardis

I can't get any submodule command to work on the master branch, had to manually reset the module and then bump the index (also changed from ssh to https). I think the issue is solved with this.

Try,

svd-parser = {git = "https://github.com/emilgardis/svd", branch = "master-cmsis-updated"}

Now it loads cmsis-svd on cargo update. It is awful.

burrbull avatar Dec 26 '22 15:12 burrbull

we could make it so that the submodule is not checked out with cargo, see https://github.com/rust-lang/cargo/pull/10717, pushed those changes to my branch, results in

❯ cargo update
    Updating git repository `https://github.com/emilgardis/svd`
    Skipping git submodule `https://github.com/posborne/cmsis-svd.git` due to update strategy in .gitmodules

Emilgardis avatar Dec 26 '22 17:12 Emilgardis