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

Reduce filenames of golden files #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

palas
Copy link

@palas palas commented Aug 22, 2024

Motivation

When I tried cloning this GitHub repo, I straight way got the following issue:

Cloning into 'cardano-addresses'...
remote: Enumerating objects: 22520, done.
remote: Counting objects: 100% (1189/1189), done.
remote: Compressing objects: 100% (135/135), done.
remote: Total 22520 (delta 1113), reused 1081 (delta 1054), pack-reused 21331 (from 1)
Receiving objects: 100% (22520/22520), 79.32 MiB | 13.77 MiB/s, done.
Resolving deltas: 100% (17622/17622), done.
fatal: cannot create directory at 'core/test/golden/addresses_excess_behave_track_soul_table_wear_ocean_cash_stay_nature_item_turtle_palm_soccer_lunch_horror_start_stumble_month_panic_right_must_lock_dress': File name too long

ext4 has a path limit of 255 bytes and that relative path has already 171 characters, so it is very easy to exceed the limit when trying to clone the project into an already moderately long subdir. This gets worse on top of other filesystems like ecryptfs

Solution

In order to improve portability, this PR renames the golden files to only contain the first 8 characters of the base16 encoding of the result of hashing the mnemonic key using sha3_256 instead of inlining the actual mnemonic key. It also adds a missing _ (underscore) in the name of inspects* files for consistency with the addresses_* files.

@palas palas added the PR:RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG label Aug 22, 2024
@palas palas self-assigned this Aug 22, 2024
Copy link
Collaborator

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants