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

tools/v2check: implement migration tool with all the required changes #2656

Merged
merged 14 commits into from May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,3 +21,4 @@ contrib_coverage*.txt
/core_coverage.txt
gotestsum-report*.xml
/internal/apps/unit-of-work/unit-of-work
tools/v2check/_stage/v2playground/*
227 changes: 225 additions & 2 deletions go.work.sum

Large diffs are not rendered by default.

56 changes: 0 additions & 56 deletions tools/v2check/_stage/ddtrace_simple.go

This file was deleted.

30 changes: 30 additions & 0 deletions tools/v2check/_stage/ddtracetypes/ddtracetypes.go
@@ -0,0 +1,30 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2023 Datadog, Inc.

package main

import (
"time"

"gopkg.in/DataDog/dd-trace-go.v1/ddtrace"
)

func main() {
var (
_ ddtrace.FinishConfig // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.FinishOption // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.Logger // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.Span // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.SpanContext
_ ddtrace.SpanLink // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.StartSpanConfig // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.StartSpanOption // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.Tracer // want `the declared type is in the ddtrace/tracer package now`
_ time.Time
)
}

func spanConsumer(_ ddtrace.Span) { // want `the declared type is in the ddtrace/tracer package now`
}
29 changes: 29 additions & 0 deletions tools/v2check/_stage/ddtracetypes/ddtracetypes.go.golden
@@ -0,0 +1,29 @@
-- the declared type is in the ddtrace/tracer package now --
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2023 Datadog, Inc.

package main

import (
"github.com/DataDog/dd-trace-go/v2/ddtrace"
"github.com/DataDog/dd-trace-go/v2/ddtrace/tracer"
)

func main() {
var (
_ tracer.FinishConfig // want `the declared type is in the ddtrace/tracer package now`
_ tracer.FinishOption // want `the declared type is in the ddtrace/tracer package now`
_ tracer.Logger // want `the declared type is in the ddtrace/tracer package now`
_ tracer.Span // want `the declared type is in the ddtrace/tracer package now`
_ ddtrace.SpanContext
_ tracer.SpanLink // want `the declared type is in the ddtrace/tracer package now`
_ tracer.StartSpanConfig // want `the declared type is in the ddtrace/tracer package now`
_ tracer.StartSpanOption // want `the declared type is in the ddtrace/tracer package now`
_ tracer.Tracer // want `the declared type is in the ddtrace/tracer package now`
)
}

func spanConsumer(_ tracer.Span) { // want `the declared type is in the ddtrace/tracer package now`
}
44 changes: 21 additions & 23 deletions tools/v2check/_stage/go.mod
@@ -1,42 +1,40 @@
module github.com/DataDog/dd-trace-go/tools/v2check/_stage
module github.com/DataDog/dd-trace-go/v2/tools/v2check/_stage

go 1.19

require gopkg.in/DataDog/dd-trace-go.v1 v1.58.1
require gopkg.in/DataDog/dd-trace-go.v1 v1.62.0

require (
github.com/DataDog/appsec-internal-go v1.4.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.50.0 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.50.0 // indirect
github.com/DataDog/datadog-go/v5 v5.4.0 // indirect
github.com/DataDog/go-libddwaf/v2 v2.2.3 // indirect
github.com/DataDog/go-sqllexer v0.0.10 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/sketches-go v1.4.3 // indirect
github.com/DataDog/appsec-internal-go v1.5.0 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.52.1 // indirect
github.com/DataDog/datadog-go/v5 v5.5.0 // indirect
github.com/DataDog/go-libddwaf/v2 v2.4.2 // indirect
github.com/DataDog/go-sqllexer v0.0.11 // indirect
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect
github.com/DataDog/sketches-go v1.4.4 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/ebitengine/purego v0.7.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/outcaste-io/ristretto v0.2.3 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
github.com/tinylib/msgp v1.1.9 // indirect
go.uber.org/atomic v1.11.0 // indirect
go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a // indirect
google.golang.org/protobuf v1.33.0 // indirect
)