Skip to content

Make dedicated package for release archive handling #72

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

Merged
merged 4 commits into from
Aug 25, 2021
Merged

Make dedicated package for release archive handling #72

merged 4 commits into from
Aug 25, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 25, 2021

The planned addition of Library Manager content maintenance capabilities to the tool requires that all data related to the library release archives be accessible via the internal API.

I found that the Git clone path naming had been used unnecessarily as the basis for the archive paths naming, even though the end goal was to base it on the library repository name. They are based on this URL to different extents, so this really made no sense.

This is the initial minimal refactoring for what will eventually be a more significant package.
The change resulted in an import cycle in `internal/libraries/git_integration_test.go`. I changed its package name as a
workaround.
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Aug 25, 2021
Copy link
Contributor

@silvanocerza silvanocerza left a comment

Choose a reason for hiding this comment

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

Just a small change to make, the rest is great. 👍

Previously, the compilation of the regular expression used to convert the library name to the release archive root folder
and file name was done inside the function, which caused it to be compiled redundantly for every subsequent call. Moving
it to the package scope improves the function's efficiency.
@per1234 per1234 merged commit f51f98d into arduino:main Aug 25, 2021
@per1234 per1234 deleted the archive-package branch August 25, 2021 09:42
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants