Duplicated symbols, and _prebuild with PSyclone
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 9
- Avg merge
- 12d 12h
- Merged PRs (30d)
- 2
Description
Depending on scripts, PSyclone will run a static call-tree analysis, and as such need access to all source files. This is done atm by specifying the source root folder as command line option (and it has its own manager for managing symbols found in the various source files).
With Fab, PSyclone will be pointed to the `build` directory. But, this directory also contains `_prebuild`, which contains e.g. the hashed algorithm and psy-layer source files. Therefore, there is a risk that PSyclone might pick up a file from the `_prebuild` directory (it will check first for coding standard-compliant filenames, and as such for LFRic it will find the expected files first, but the moment we get say UM files that do not adhere to the coding standard, PSyclone will start looking for similar file names, and then a hashed file *might* be picked, depending on the order in which the file walk will find directories). We have https://github.com/stfc/PSyclone/issues/2793 open to e.g. support an 'ignore directory' option, but tbh, that's not high on the priority list atm.
I wonder if we should consider moving the `_prebuild` directory out and next to the `source` directory, must to avoid a (somewhat theoretical) future issue? Hoping that everything is accessing that directory using the `BuildConfig`, it might be a reasonable small change (except for the tests). I also wonder if this should be renamed to e.g. `_cache` or so? Since (by default) Fab will remove unused files in that directory, it feels more like a cache than a prebuilt directory.
Contributor guide
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 tracing how BuildConfig accesses the build and _prebuild directories, then review the tests affected by those paths. Clarify whether the task is to move _prebuild, rename it to _cache, or both; done means the chosen layout works consistently without duplicated source symbols and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100