diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfde64b9..0244ff3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,7 +197,7 @@ jobs: runs-on: windows-latest suffix: .exe steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: @@ -213,7 +213,7 @@ jobs: - run: mv target/${{ matrix.target }}/release/svd2rust${{ matrix.suffix || '' }} svd2rust-${{ matrix.target }}-$(git rev-parse --short HEAD)${{ matrix.suffix || '' }} - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: artifact-svd2rust-${{ matrix.target }} path: svd2rust-${{ matrix.target }}* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77ebdd1b..c9ce19be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} run: mv target/${{ matrix.target }}/release/svd2rust${{ matrix.suffix }} svd2rust-${{ matrix.target }}${{ matrix.suffix }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: svd2rust-${{ matrix.target }} path: svd2rust-${{ matrix.target }}${{ matrix.suffix }} @@ -63,7 +63,7 @@ jobs: needs: [build] steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: artifacts - run: ls -R ./artifacts @@ -76,7 +76,7 @@ jobs: with: version: ${{ (github.ref_type == 'tag' && github.ref_name) || 'Unreleased' }} - - uses: softprops/action-gh-release@v1 + - uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.changelog-reader.outputs.version }} name: ${{ (github.ref_type == 'tag' && steps.changelog-reader.outputs.version) || format('Prereleased {0}', env.CURRENT_DATE) }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 91612ace..312c949a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +- Fix reexport path when "%s" inside "derivedFrom" - Force using rust edition 2021 in CI - Added lifetime ellision for `FieldWriter` where the explicit lifetimes are not necessary, which fixes the `clippy::needless_lifetimes` warning on rustc 1.84 diff --git a/src/util.rs b/src/util.rs index 5c56f3c3..f97cb378 100644 --- a/src/util.rs +++ b/src/util.rs @@ -295,14 +295,18 @@ pub fn block_path_to_ty( ) -> TypePath { let mut path = config.settings.crate_path.clone().unwrap_or_default().0; path.segments.push(path_segment(ident( - &bpath.peripheral, + &bpath.peripheral.remove_dim(), config, "peripheral_mod", span, ))); for ps in &bpath.path { - path.segments - .push(path_segment(ident(ps, config, "cluster_mod", span))); + path.segments.push(path_segment(ident( + &ps.remove_dim(), + config, + "cluster_mod", + span, + ))); } TypePath { qself: None, path } } @@ -314,7 +318,7 @@ pub fn register_path_to_ty( ) -> TypePath { let mut p = block_path_to_ty(&rpath.block, config, span); p.path.segments.push(path_segment(ident( - &rpath.name, + &rpath.name.remove_dim(), config, "register_mod", span,