name conflicts with the packages directory files
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
If you start M2 in a folder which includes a file that matches the name of one in the packages folder, then at startup, M2 tries to load that file, and when it doesn't contain code it was expecting, something breaks, and the error can be hard to detect. Also, you don't want to need to be aware of all names of such files, to avoid them.
The problem is even worse on systems such as MacOS which have case insensitive file names.
Also, there is a bug in `ctest` along these lines: many files in `Macaulay2/tests` have names which match those in the packages directory, and the same issue arises, as it sets the path to include the tests directory, then calls M2 (there is another bug in ctest which is about to be fixed, #4303, involving gbTrace), but this is distinct from that.
In general, I don't want my files in my current directory to be mistaken for package files to be loaded at startup. However, there is a case when I do want something like that: I am working on a new version of a package already in Macaulay2. But I think this should be the non-default case, rather than the behavior mentioned here.
How should we handle this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing startup with a current-directory file whose name matches a file in the packages directory, then compare that behavior with ctest when Macaulay2/tests is added to the path. Inspect the package-loading and ctest entry points implicated by the report. Done should prevent unintended current-directory files from being loaded by default while preserving a deliberate workflow for developing an existing package.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100