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(manager/tool-versions): support .tool-versions #14092

Closed
wants to merge 15 commits into from
Closed

feat(manager/tool-versions): support .tool-versions #14092

wants to merge 15 commits into from

Conversation

olegkrivtsov
Copy link
Contributor

Changes:

Upgrade versions in .tool-versions #4051

Context:

Closes #4051

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/readme.md Show resolved Hide resolved
lib/manager/tool-versions/extract.ts Show resolved Hide resolved
@olegkrivtsov
Copy link
Contributor Author

Hi @viceice could you please advice why this linter error could appear? I'm a bit confused how it was possible..
image

@olegkrivtsov olegkrivtsov requested a review from viceice February 9, 2022 06:00
@viceice
Copy link
Member

viceice commented Feb 9, 2022

You need to run yarn null-check locally. You can enable this in main tsconfig to see the error in editor temporary.

@zharinov can you give some suggestions for the strict null errors?

@zharinov
Copy link
Collaborator

zharinov commented Feb 9, 2022

Suggested edit:

diff --git a/tsconfig.strict.json b/tsconfig.strict.json
index e5591d0e6..857dae15f 100644
--- a/tsconfig.strict.json
+++ b/tsconfig.strict.json
@@ -337,6 +337,8 @@
     "lib/manager/terragrunt/extract.ts",
     "lib/manager/terragrunt/index.ts",
     "lib/manager/terragrunt/modules.ts",
+    "lib/manager/tool-versions/extract.ts",
+    "lib/manager/tool-versions/index.ts",
     "lib/manager/travis/extract.ts",
     "lib/manager/travis/index.ts",
     "lib/platform/api.ts",

@zharinov
Copy link
Collaborator

zharinov commented Feb 9, 2022

@olegkrivtsov Sorry for confusion, we're transitioning our codebase to strict null checks

@viceice
Copy link
Member

viceice commented Feb 9, 2022

Shouldn't we make this PR strict compatible now? Or are there too may transitive errors?

lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
@rarkins rarkins marked this pull request as draft February 14, 2022 08:50
@olegkrivtsov olegkrivtsov marked this pull request as ready for review February 14, 2022 13:19
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/tool-versions/extract.spec.ts Outdated Show resolved Hide resolved
@olegkrivtsov olegkrivtsov requested a review from rarkins February 16, 2022 11:54
Comment on lines +51 to +52
currentDigest: '10.15.0',
currentRawValue: 'ref:10.15.0',
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this is what we like to have. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @viceice could you please tell me what's incorrect here and what you'd like to see instead? I'm a bit confused, since I thought 'ref' is typically a digest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, would currentRawValue be useful here or I should remove it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that if it's a version then this should be currentValue and not currentDigest, and we should use semver versioning

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rarkins I currently use semver-coerced, because in their doc examples versions sometimes look like semver-coerced: v1.0.3-a. This version won't be a valid semver, which always should look as 1.0.3.

{
currentValue: '3.2.5',
currentVersion: '3.2.5',
datasource: 'ruby-version',
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to check how they build/compile this version. If they build it directly from repo source, then it should also be github-tags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rarkins as their docs state, they build the version from source by compiling. So I will use github-tags in that case as you suggest.

currentValue: '10.15.0',
currentVersion: '10.15.0',
datasource: 'github-tags',
depName: 'nodejs',
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add node versioning too if the current value is a valid version

Comment on lines +51 to +52
currentDigest: '10.15.0',
currentRawValue: 'ref:10.15.0',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that if it's a version then this should be currentValue and not currentDigest, and we should use semver versioning

@rarkins rarkins marked this pull request as draft February 28, 2022 09:17
@rarkins
Copy link
Collaborator

rarkins commented Feb 28, 2022

Converted to draft as @olegkrivtsov is not currently able to work on this for some time

@rarkins rarkins closed this Feb 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade versions in .tool-versions
4 participants