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

Some cleanups to the codebase #293

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Some cleanups to the codebase #293

wants to merge 5 commits into from

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jan 24, 2025

  • Replaced deprecated io/ioutils with the equivalent calls
  • Fixed some linter complaints about errors format and other minor things
  • Removed useless libraries package at the top level, and merged the tests with the existing internal/libraries package.

Copy link

@dido18 dido18 left a comment

Choose a reason for hiding this comment

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

🧹

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

The libraries package was created for a reason:

#57

Please put it back.

@cmaglie
Copy link
Member Author

cmaglie commented Jan 27, 2025

The libraries package was created for a reason:

Thanks for the review @per1234!

Are we using this package somewhere? I could not find any reference to it.

If it's not used I'd prefer to remove it (even if it's technically a breaking change, I'm pretty sure nobody outside Arduino is using it).

If we are using I'd like to replace it with a package in the arduino-cli as we did for the fqbn, to reduce the spreading of the implementations.

@per1234
Copy link
Contributor

per1234 commented Jan 27, 2025

Are we using this package somewhere?

Yes, it is used here:

https://github.com/arduino/library-registry/blob/production/.github/workflows/assets/validate-registry/main.go

@per1234
Copy link
Contributor

per1234 commented Jan 27, 2025

I'd like to replace it with a package in the arduino-cli as we did for the fqbn, to reduce the spreading of the implementations.

It doesn't make sense to move it to the github.com/arduino/arduino-cli module because Arduino CLI doesn't use the registry file.

@cmaglie
Copy link
Member Author

cmaglie commented Jan 27, 2025

It doesn't make sense to move it to the github.com/arduino/arduino-cli module because Arduino CLI doesn't use the registry file.

I see.

What about moving validate-registry/main.go in a sub-command of libraries-repository-engine?

I think this would give us some long-term advantages:

  • the GitHub workflow in library-registry that checks the registry format would need to download the latest release of the library-repository-engine and run it on the registry.txt to check it, without the need to build it as a golang project.
  • it will simplify the library-registry repo since we could remove all the golang tooling assets
  • it will move all the business logic in a single place, which is easier to keep in sync

@per1234
Copy link
Contributor

per1234 commented Jan 27, 2025

What about moving validate-registry/main.go in a sub-command of libraries-repository-engine?

Sounds good.

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