Skip to content

poly check should validate that components and bases have unique names #430

@tjweitzel225

Description

@tjweitzel225

In exploring the tool and architecture, I noticed that I can freely create a base and a component that share the same name, with one shadowing the other in the namespace.

It appears that the Clojure implementation recognizes this as Error 105 - Illegal name sharing.

This tool should probably throw an error or warning when this occurs, like the Clojure CLI. From what I can tell, the base version is what actually gets used in the workspace in this situation.

~/test-workspace (main) $ uv run poly create workspace --name namespace
~/test-workspace (main) $ uv run poly create base --name A
~/test-workspace (main) $ uv run poly create component --name A
~/test-workspace (main) $ uv run poly info
                                                                                                                                                                                                                           
Workspace summary                                                                                                                                                                                                          
                                                                                                                                                                                                                           
projects: 0
components: 1
bases: 1
development: 1
                       
  brick   development  
 ───────────────────── 
  A            -       
  A            -       
                       
~/test-workspace (main) $ uv run poly check # No issue

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions