Skip to content

Implement new identifier keys for file names #358

@dwong2708

Description

@dwong2708

Implement new identifier keys for file names

Summary:
Adopt a hybrid approach (Slugify + Short Hash) to generate safe, human-readable, and unique filenames across different filesystems.


Context

There are blockers when mapping identifiers directly to the file system:

  • Identifiers are case-sensitive.
  • Most operating systems are not case-sensitive, which can cause conflicts.

To address this, the most acceptable option is a hybrid approach using slugify and hash startegy.


Hybrid: Slugify + Short Hash

What it does:

  • Slugify for readability.
  • Append a short hash of the original identifier for uniqueness.

Example mapping:

  • My:Componentmy_component_a12f4c.toml
  • My/Componentmy_component_b91d0e.toml

Pros:

  • Human-readable (my_component part).
  • Collision-resistant (hash ensures uniqueness).
  • Works across case-insensitive and case-sensitive filesystems.

Cons:

  • Slightly longer filenames.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions