Skip to content

Generated file names can conflict on a case-insensitive file system #870

@krame505

Description

@krame505

On a system such as MacOS with case-insensitive file names, we can end up with multiple generated files in the same folder with names that conflict - e.g. productions foobar and fooBar would create files Pfoobar.java and PfooBar.java, which are the same path on MacOS.

The proper fix for this is probably just to change how we encode generated file names to escape uppercase chars, e.g. the above would become Pfoobar.java and Pfoo_Bar.java instead. For nonterminals, we can probably assume that they start with an uppercase letter (I think the syntax enforces this?) and avoid always escaping the first character. This will be a somewhat annoying change to make, as many references to generated classes in the runtime will need to be updated. However this may be possible to automate using some clever regexes.

A workaround for now is to create a seperate partition with a case-sensitive filesystem for Silver development.

Metadata

Metadata

Assignees

Labels

bugrenameIssues for things being renamed. These are annoying because they make other people's branches break.

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions