-
-
Notifications
You must be signed in to change notification settings - Fork 116
2022 11 11 Use git instead of file system to generate sources
- Status: accepted
- Date: 2022-11-11
Technical Story: #385
We noticed that we could not copy files when --to
was different than HEAD
because it would copy files at a different state (and could even copy file we do not want to be copied, for exemple content of static resources).
So we made a rule specifying we cannot generate delta content when --to
is different than HEAD
.
It was ok so far because 99.99% of our customer usage was from HEAD.
Then came the #354 issue and so we created the enhancement request #355
We also detected an issue with the current implementation using file system: it does not respect the .gitignore
content.
- Generate incremental sources from any state in the repo
- Respect the
.gitignore
- Keep decent performance
- Implement file copy from git content
- Implement file copy from fs after having checkout
--to
commit - Keep it working that way
Chosen option: "Implement file copy from git content", because it does not change the current software architecture, respect the .gitignore
content and does not kill to much the performance.
- It can do incremental package content generation from any point in the repo
- It respect the
.gitignore
rules
- Performance for incremental package content generation are decreased (30% to 50%)
Use git show
to rebuild fs
commands (readFile
, readdir
, pathExists
)
- Good, incremental package content generated from any point in the repo
- Good,
.gitignore
rules are enforced - Bad, because of performance (30% to 50% drop)
- Bad, because of huge refactoring
Use git checkout to
and then keep fs
based implementation
- Good, incremental package content generated from any point in the repo
- Good, because of performance (5% to 10% drop, depending on size of the repo)
- Good, because the implementation is pretty simple
- Bad,
.gitignore
rules are not enforced
We just do nothing, sorry for the 0.01% of our users
- Good, because we do not start a massive refactoring
- Bad, because it cannot do incremental package content generated from any point in the repo
- Bad,
.gitignore
rules are not enforced