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

feat: progress tracker [IDE-175] #130

Closed
wants to merge 1 commit into from
Closed

Conversation

teodora-sandu
Copy link
Contributor

This PR is extracting the progress tracker to GAF so that it can be used by the CLI too. The LS uses it to update the display for our IDEs, the CLI could use it to log or do whatever sort of updates they want (for example, update the progress bar).

The changes in snyk-ls are in snyk/snyk-ls#465.

@teodora-sandu teodora-sandu requested a review from a team as a code owner March 13, 2024 10:40
@@ -1,56 +1,56 @@
module github.com/snyk/go-application-framework

go 1.18
go 1.21
Copy link
Contributor

Choose a reason for hiding this comment

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

@PeterSchafer this should be ok, now that CLI is using a higher go version, right?

Copy link
Member

Choose a reason for hiding this comment

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

We are on go 1.21 now


func (t *Tracker) EndWithMessage(message string) {
if t.finished {
panic("Called end progress twice. This breaks LSP in Eclipse fix me now and avoid headaches later")
Copy link
Contributor

Choose a reason for hiding this comment

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

cough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this something we should fix now? It's a bit annoying to mention LSP and Eclipse, plus not ideal to cause a panic in the CLI although if the function is used correctly we shouldn't cause it. It might be better to log an error instead and return early maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants