rokucommunity / rokucommunity/brighterscript
Convert bsconfig merging into a deep clone
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
Currently, bsconfig.json files can be extended. (i.e. your bsconfig.json extends base.bsconfig.json). As such, the current logic does a shallow merge of the two. Something to this effect:
var config = {
...getDefaults(),
...getConfig('base.bsconfig.json'),
...getConfig('bsconfig.json')
};
What this means is, for arrays and objects, the child completely overrides the parent. So if you wanted the base.bsconfig.json to specify some entries in files and the child to specify some more, this would not work. The child's files array would totally override the parent's.
We should use a deep copy of all bsconfig.json values when using extends or project
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
Locate the configuration-loading and merge logic used by bsconfig.json extends and project settings. Start by tracing how base.bsconfig.json and bsconfig.json values are combined, then inspect any existing configuration tests. Done means nested objects and arrays from the parent and child configurations are combined without the child unintentionally replacing all parent entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100