-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[crosslink tool] Implement crosslink tool #8822
Conversation
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Is there any value in adding some docs around using this new capability, maybe in CONTRIBUTING.md? The goal being making it easier for contributors (especially new contributors) to about |
This is a good callout and something I have been thinking about myself. I think there is definitely value in adding it somewhere. I believe |
cd6f1b7
to
bee779b
Compare
Updated |
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
PR rebased for 0.48.0. |
@bryan-aguilar please fix CI/CD |
@bogdandrutu fixed, sorry about the delay. |
Description: This PR adds the crosslink tool to the repository. Crosslink will automatically insert any missing replace statements for intra-repository go modules. For more info please refer to the crosslink readme here.
Currently crosslink is run using the
make crosslink
target. It is setup to only perform non-destrructive actions as replace statements should be additive after initial crosslink on-boarding. If other operations are required such as overwriting or pruning crosslink can be run with those flags separately.After running
make crosslink
a missing replace statement inwindowperfcountersreceiver
was inserted.I have also ran crosslink with the
--overwrite
flag and commited the changes to the go.mod files inawscloudwatchlogsexporter
,awsemfexporter
andawsprometheusremotewriteexporter
as an example of what changes crosslink would make. There are many morego.mod
files in this repository that could be updated. I did not want to create an initial PR with all of those changes at once though. If this is accepted and merged I can update the rest of thego.mod
files and create a follow on PR.I did not add the execution of crosslink to any other process of the makefile. I was hoping to have a discussion on whether that should be done now or should we leave it isolated so developers can use it as they wish? Typically crosslink should be ran from the repository root to ensure that all submodules are mapped properly.
Link to tracking Issue: #7055
Testing: Testing for crosslink can be found in the
opentelemetry-go-build-tools
repository.Documentation: