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
Conversation
@@ -1,56 +1,56 @@ | |||
module github.com/snyk/go-application-framework | |||
|
|||
go 1.18 | |||
go 1.21 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
There was a problem hiding this comment.
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?
97ffa8e
to
e2f7830
Compare
e2f7830
to
22c084c
Compare
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.