Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the zcl and template packages during generation #1443

Conversation

brdandu
Copy link
Collaborator

@brdandu brdandu commented Oct 9, 2024

  • Create a flag called --upgradeZapFile which can be passed during generation to update the package paths during generation. add this to apack.json
  • During generation use the flag to determine if packages should be updated in the .zap file. If the .zap file does not already have the packages mentioned in generation(uc_generate) then the .zap file is updated with those packages and saved.
  • JIRA: ZAPP-1456

@brdandu brdandu force-pushed the improvement/updateZapFilePackagesDuringGenerationThroughApack/ZAPP-1456 branch 4 times, most recently from dae568e to b803300 Compare October 21, 2024 20:30
@brdandu brdandu force-pushed the improvement/updateZapFilePackagesDuringGenerationThroughApack/ZAPP-1456 branch from b803300 to 1531603 Compare October 22, 2024 14:08
Copy link
Collaborator

@tecimovic tecimovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll say this: I don't like this. We're "on-the-fly"overwriting the input file. Someone, somewhere will say: "Why do I have a diff in this file? I didn't change anything!"

So I don't like this functionality in general, because I think it has a potential of causing more damage than not.

But it's hidden behind the CLI switch, so if someone doesn't want to use it, they can simply not pass in that switch. So I'm ok with merging this, because this is all optional, I just don't want this to me missused as some kind of silver bullet.

@brdandu
Copy link
Collaborator Author

brdandu commented Oct 22, 2024

I'll say this: I don't like this. We're "on-the-fly"overwriting the input file. Someone, somewhere will say: "Why do I have a diff in this file? I didn't change anything!"

So I don't like this functionality in general, because I think it has a potential of causing more damage than not.

But it's hidden behind the CLI switch, so if someone doesn't want to use it, they can simply not pass in that switch. So I'm ok with merging this, because this is all optional, I just don't want this to me missused as some kind of silver bullet.

Our chat for reference https://silabsiot.slack.com/archives/D67QEA77C/p1729626363562279

- Create a flag called --upgradeZapFile which can be passed during generation to update the package paths during generation. add this to apack.json
- During generation use the flag to determine if packages should be updated in the .zap file. If the .zap file does not already have the packages mentioned in generation(uc_generate) then the .zap file is updated with those packages and saved.
- Normalize the paths in the options.zcl/template such that they can be searched accurately in the database
- Adding unit tests for checking the path upgrades to packages in the .zap file before and after generation is complete.
- JIRA: ZAPP-1456
@brdandu brdandu force-pushed the improvement/updateZapFilePackagesDuringGenerationThroughApack/ZAPP-1456 branch from 1531603 to 7424a13 Compare October 22, 2024 20:08
@brdandu brdandu merged commit 1425198 into project-chip:master Oct 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants