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

fix: disable version check for use as an external library #1938

Closed
wants to merge 4 commits into from

Conversation

leaanthony
Copy link
Contributor

This PR adds an internal flag to the executor to disable version checks. This is to ensure that any application that uses Task as a library doesn't error when Task checks the buildinfo.
This PR also renames close to closer in task.go as it clashes with the keyword `close.

Copy link
Member

@pd93 pd93 left a comment

Choose a reason for hiding this comment

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

Thanks for this @leaanthony.

Just a thought before this is merged. I don't think we should require users of our library to set a DisableVersionCheck flag to make Task work as package. I feel like this should be the default behaviour and our CLI entrypoint should enable it instead (basically, the reverse of this PR).

@leaanthony
Copy link
Contributor Author

I actually agree with you. This got me over the line but yeah adding the in the CLI and not init() works better

@leaanthony leaanthony changed the title Disable version check flag Disable version check for external libraries Dec 8, 2024
@leaanthony
Copy link
Contributor Author

leaanthony commented Dec 8, 2024

@pd93 - Updated the PR to run the version initialisation on cli startup. Tidied the version output if there is no sum.

internal/version/version.go Outdated Show resolved Hide resolved
@leaanthony leaanthony force-pushed the disable-version-check-flag branch from 504a0da to 89e7b35 Compare December 17, 2024 20:09
Comment on lines +61 to +62
// Initialise version
ver.Init()
Copy link
Member

Choose a reason for hiding this comment

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

No longer required after the discussed changes

@andreynering andreynering changed the title Disable version check for external libraries fix: disable version check for use as an external library Jan 18, 2025
andreynering added a commit that referenced this pull request Jan 18, 2025
@andreynering
Copy link
Member

Thanks @leaanthony. Manually merged as 69f5714.

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