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

Implement verify-vendor.sh in pure Go #1030

Open
1 of 3 tasks
aep-sunlife opened this issue Sep 30, 2024 · 3 comments
Open
1 of 3 tasks

Implement verify-vendor.sh in pure Go #1030

aep-sunlife opened this issue Sep 30, 2024 · 3 comments

Comments

@aep-sunlife
Copy link

Feature request checklist

  • There are no issues that match the desired change
  • The change is large enough it can't be addressed with a simple Pull Request
  • If this is a bug, please file a Bug Report.

Change

Please rewrite the helper script verify-vendor.sh in pure Go, for the benefit of the Go community.

Shell scripts are inherently fragile and difficult to maintain compared to higher level languages. Migrating to Go simplifies the installation process. It increases portability. It increases reliability, enabling richer test suites.

@TristonianJones
Copy link
Collaborator

Hi @aep-sunlife, the script was contributed to the CEL repo, so I'm not sure what this would entail. Would this be related to go mod verify? Or did you have something else in mind?

@aep-sunlife
Copy link
Author

aep-sunlife commented Oct 23, 2024

Shell scripts tend to complicate things for Windows contributors and Windows users. But shell scripts can break UNIX environment as well, such as Alpine Linux and FreeBSD (bash is not the default shell there). Shell is harder to test, harder to guarantee portability, and harder to lint/SAST than general purpose programming languages like Go.

Even shellcheck, set... flags, and sticking to 100% POSIX tools and CLI flags are not sufficient to produce perfect shell scripts.

Go is Turing complete, capable of performing a wide variety of tasks without resorting to (inherently less portable) shell tricks.

Let's publish the same logic in pure Go code, such as an ordinary Go program.

@TristonianJones
Copy link
Collaborator

TristonianJones commented Oct 23, 2024

That's all well and good, but an example implementation that matches what you have in mind would be very helpful.

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

No branches or pull requests

2 participants