-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expose Go API functions for loading library registry data files #57
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
per1234
merged 3 commits into
arduino:main
from
per1234:registry-validation-capabilities
Jul 15, 2021
Merged
Expose Go API functions for loading library registry data files #57
per1234
merged 3 commits into
arduino:main
from
per1234:registry-validation-capabilities
Jul 15, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Access to this function from outside the package is needed for validating the registry data file.
Since they were intended only for use in the "sync_libraries" application, the module's packages were made `internal` to clearly communicate that they are not part of a public API so that we will not need to be concerned with unintentional impacts on other projects if breaking changes to the internal API are required in the course of development on the code base. Select parts of the API may be exposed externally as they are determined to be useful for other projects. Such a case has arisen with the need to validate the library registry data file format.
The previous module path `arduino.cc/repository` only served as an arbitrary identifier, but did not have the expected support for `go get`/`go install`: ``` $ go get arduino.cc/repository go get arduino.cc/repository: unrecognized import path "arduino.cc/repository": reading https://arduino.cc/repository?go-get=1: 404 Not Found ```
cmaglie
approved these changes
Jul 15, 2021
silvanocerza
approved these changes
Jul 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since they were intended only for use in the "sync_libraries" application, the module's packages were made
internal
to clearly communicate that they are not part of a public API so that we will not need to be concerned with unintentional impacts on other projects if breaking changes to the internal API are required in the course of development on the code base.Selected parts of the API may be exposed externally as they are determined to be useful for other projects. Such a case has arisen with the need to validate the library registry data file format:
https://github.com/arduino/library-registry/tree/production/.github/workflows/assets/validate-registry
In order to facilitate the use of this project as a dependency in Go programs via the Go modules system, the module path was renamed from
arduino.cc/repository
togithub.com/arduino/libraries-repository-engine
. The previous module path only served as an arbitrary identifier, but did not have the expected support forgo get
/go install
:Although the module path renaming would generally be considered a breaking change, since the API of the project was previously only considered to be:
none of which are affected by this change, I'm not sure that we need to consider the path change breaking at this stage but this PR adds a Go API to the project's supported public interfaces and after it is released we will recognize it as such.