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

fix(ci): remove import path from type names on compact-codec #12125

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/compact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `Compact`.
- name: Generate compact vectors
run: ${{ matrix.bin }} -- test-vectors compact --write
run: |
${{ matrix.bin }} -- test-vectors compact --write &&
for f in ./testdata/micro/compact/*; do mv "$f" "$(dirname "$f")/$(basename "$f" | awk -F '__' '{print $NF}')"; done
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main still creates vector files with the import path in their names, so we temporarily need this to remove it

- name: Checkout PR
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/commands/src/test_vectors/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,5 @@ where
}

pub fn type_name<T>() -> String {
std::any::type_name::<T>().replace("::", "__")
std::any::type_name::<T>().split("::").last().unwrap_or(std::any::type_name::<T>()).to_string()
}
Loading