-
Notifications
You must be signed in to change notification settings - Fork 278
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
internal code uses deprecated APIs #2480
Labels
Comments
Here's an initial list of uses of deprecated APIs as reported by
|
cueckoo
pushed a commit
that referenced
this issue
Jul 12, 2023
The shared `*cue.Instance` used by the filetypes logic was causing a race when loading. Using `cue.Value` instead avoids the race because `cue.Value` is already finalized. Updates #1746, #2480. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I48819188f1f0bbda62909f3aea8675953e2d8fc2 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/556519 Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo+gerrithub@cuelang.org> Reviewed-by: Paul Jolly <paul@myitcv.io>
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the astutil package. While here, fix a few typos. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I3a4f424379a1bdb7e82c67841f891e292f3f0d09
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the astutil package. While here, fix a typo and some unordered imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I3a4f424379a1bdb7e82c67841f891e292f3f0d09
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the astutil package. While here, fix a typo and some unordered imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I3a4f424379a1bdb7e82c67841f891e292f3f0d09
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the filetypes package. While here, fix some unordered imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ic578b5a25a8839caa28da69930b7dcb597d6c2ec
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
The PackageInfo method was declared deprecated. This CL replaces all usages of this method with the newer GetPackageInfo method (which is what PackageInfo called behind the scenes), and removes the PackageInfo function. In addition, the code is reorganized slightly to move some vars to a smaller scope closer to their usage. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Idb5a0d24d2cb5ef6d34bd17fdd5718b55c4bb465
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
The PackageInfo method was declared deprecated. This CL replaces all usages of this method with the newer GetPackageInfo method (which is what PackageInfo called behind the scenes), and removes the PackageInfo function. In addition, the code is reorganized slightly to move some vars to a smaller scope closer to their usage. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Idb5a0d24d2cb5ef6d34bd17fdd5718b55c4bb465
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the astutil package. While here, fix a typo and some unordered imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I3a4f424379a1bdb7e82c67841f891e292f3f0d09 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194643 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
This removes some deprecated API usages in the filetypes package. While here, fix some unordered imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ic578b5a25a8839caa28da69930b7dcb597d6c2ec Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194645 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
cueckoo
pushed a commit
that referenced
this issue
May 13, 2024
The PackageInfo method was declared deprecated. This CL replaces all usages of this method with the newer GetPackageInfo method (which is what PackageInfo called behind the scenes), and removes the PackageInfo function. In addition, the code is reorganized slightly to move some vars to a smaller scope closer to their usage. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Idb5a0d24d2cb5ef6d34bd17fdd5718b55c4bb465 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194646 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
*cue.Instance is deprecated and being replaced by cue.Value. This CL replaces the usage of a *cue.Instance by the equivalent cue.Context method. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Idb1c4a3dab4144fe62bcb1f58deb926fb46082e0
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
Some usages of the following deprecated types and methods are replaced by their non-deprecated equivalents - cue.Runtime - Value.Lookup - ast.Node.AddComment Various usages of these are removed and replaced with the non-deprecated versions. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I501fbdc518b3edf122ec13b751502f15e2372244
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
Some usages of the following deprecated types and methods are replaced by their non-deprecated equivalents: - cue.Runtime - Value.Lookup - ast.Node.AddComment Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I501fbdc518b3edf122ec13b751502f15e2372244
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
Some usages of the following deprecated types and methods are replaced by their non-deprecated equivalents: - cue.Runtime - Value.Lookup - ast.Node.AddComment Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I501fbdc518b3edf122ec13b751502f15e2372244
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
*cue.Instance is deprecated and being replaced by cue.Value. This CL replaces the usage of a *cue.Instance by the equivalent cue.Context method. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Idb1c4a3dab4144fe62bcb1f58deb926fb46082e0 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194691 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
Some usages of the following deprecated types and methods are replaced by their non-deprecated equivalents: - cue.Runtime - Value.Lookup - ast.Node.AddComment Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I501fbdc518b3edf122ec13b751502f15e2372244 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194692 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
This CL removes the last remaining usages of the deprecated ast.Node.Comments method in the cue codebase. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ib1ab7bd84da50cd7ee07e54c338273b91c5df0c1
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
This CL removes the last remaining usages of the deprecated ast.Node.Comments and ast.Node.AddComment methods in the cue codebase. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ib1ab7bd84da50cd7ee07e54c338273b91c5df0c1
cueckoo
pushed a commit
that referenced
this issue
May 14, 2024
This CL removes the last remaining usages of the deprecated ast.Node.Comments and ast.Node.AddComment methods in the cue codebase. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: Ib1ab7bd84da50cd7ee07e54c338273b91c5df0c1 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194709 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo
pushed a commit
that referenced
this issue
May 17, 2024
This removes most usages of cue.Runtime in gocodec tests, except for a smoke test that ensures the deprecated cue.Runtime still works with the API. Also, the package doc is fixed to reference the correct package name. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I464e0d730fbdfaf5afc8bebd547b7f1590f2dd93
cueckoo
pushed a commit
that referenced
this issue
May 17, 2024
This removes most usages of cue.Runtime in gocodec tests, except for a smoke test that ensures the deprecated cue.Runtime still works with the API. Also, the package doc is fixed to reference the correct package name. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I464e0d730fbdfaf5afc8bebd547b7f1590f2dd93 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194862 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo
pushed a commit
that referenced
this issue
May 17, 2024
This replaces various usages of cue.Runtime in tests with the equivalent *cue.Context methods. `cuecontext.New` can't be used directly, as this causes an import cycle. A `newContext` method already existed for creating a cue.Context, and is extracted to a shared internal func for reuse across pkg/... Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I9bcf3011096a17c3a7f81e80c57414a9b9d9b7b2
cueckoo
pushed a commit
that referenced
this issue
May 17, 2024
This replaces various usages of cue.Runtime in tests with the equivalent *cue.Context methods. `cuecontext.New` can't be used directly, as this causes an import cycle. A `newContext` method already existed for creating a cue.Context, and is extracted to a shared internal func for reuse across pkg/... Also, some typos are fixed. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I9bcf3011096a17c3a7f81e80c57414a9b9d9b7b2
cueckoo
pushed a commit
that referenced
this issue
May 17, 2024
This replaces various usages of cue.Runtime in tests with the equivalent *cue.Context methods. `cuecontext.New` can't be used directly, as this causes an import cycle. A `newContext` method already existed for creating a cue.Context, and is extracted to a shared internal func for reuse across pkg/... Also, some typos are fixed. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I9bcf3011096a17c3a7f81e80c57414a9b9d9b7b2 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194868 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
cueckoo
pushed a commit
that referenced
this issue
May 20, 2024
Replace various usages of the deprecated cue.Value.Lookup with cue.Value.LookupPath. Also, fix some typos and reorganize some imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I8faff629c07601dcb51fda527d8f10b80265bd92
cueckoo
pushed a commit
that referenced
this issue
May 20, 2024
Replace various usages of the deprecated cue.Value.Lookup with cue.Value.LookupPath. Also, fix some typos and reorganize some imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I8faff629c07601dcb51fda527d8f10b80265bd92
cueckoo
pushed a commit
that referenced
this issue
May 20, 2024
Replace various usages of the deprecated cue.Value.Lookup with cue.Value.LookupPath. Also, fix some typos and reorganize some imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I8faff629c07601dcb51fda527d8f10b80265bd92
cueckoo
pushed a commit
that referenced
this issue
May 20, 2024
Replace various usages of the deprecated cue.Value.Lookup with cue.Value.LookupPath. Also, fix some typos and reorganize some imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I8faff629c07601dcb51fda527d8f10b80265bd92
cueckoo
pushed a commit
that referenced
this issue
May 20, 2024
Replace various usages of the deprecated cue.Value.Lookup with cue.Value.LookupPath. Also, fix some typos and reorganize some imports. Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I8faff629c07601dcb51fda527d8f10b80265bd92 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194951 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
cueckoo
pushed a commit
that referenced
this issue
Jun 13, 2024
This fixes various errors found by staticcheck: - an unused method is removed - various usages of cue.Runtime are replaced by cue.Context - the default case of a switch statement is moved to be last Updates #2480. Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com> Change-Id: I0945d3c63fcd581aa7a6f198bc74fc1a56841b5c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196248 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes
What did you do?
Look at the source.
What did you expect to see?
No unnecessary uses of APIs that have been publicly deprecated.
What did you see instead?
Many legacy uses of
*cue.Instance
and other deprecated functions and types from thecue
package.The project should lead by example and convert its code to use the supported API, both ensuring that the API is fit for purpose and enabling removal of the deprecated APIs in the future.
The text was updated successfully, but these errors were encountered: