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

Add go.mod file to define dependencies #97

Closed
wants to merge 1 commit into from

Conversation

c0d1ngm0nk3y
Copy link

Summary

To install the bbs cli, we call go install code.cloudfoundry.org/locket/cmd/bbs@latest. But currently this is not possible because the dependencies are not managed. Adding a go.mod and a go.sum file will define the used dependencies.

Backward Compatibility

Breaking Change? No

@c0d1ngm0nk3y c0d1ngm0nk3y requested a review from a team as a code owner May 27, 2024 11:41
@winkingturtle-vmw
Copy link
Contributor

The work to turn diego's component to a real go module is a bit more involved. Check out this branch from 3 years ago we have a circular dependency problem where each components brings in other non-go-moded component. In order to truly accomplish this we need to convert each components to be independent. Above branch shows the work involved just to de-couple bbs from locket. I am happy to open a diego-release issue and assign different tasks if folks from your team are interested in doing this work. My estimate is that this is a quite significant undertaking.

@c0d1ngm0nk3y
Copy link
Author

The problem is that the current state is kind of broken, isn't it? It cannot be installed anymore with go install github.com/cloudfoundry/bbs@latest. So I had to fork it to https://github.com/sap-contributions/bbs in order to install it.

What is the alternative?

Having proper releases might be an alternative.

What is the plan?

@winkingturtle-vmw
Copy link
Contributor

If you'd like to install the binary, bbs repo is meant to be installed via diego-release.

cd diego-release/src/code.cloudfoundry.org
go build -o /tmp/bbs code.cloudfoundry.org/bbs/cmd/bbs

If you interested in solving the problem of removing the circular-dependency so bbs can be a standalone module, let's move the conversation to diego-release and I am happy to propose a few key principles to achieve this goal.

@winkingturtle-vmw
Copy link
Contributor

I've gone ahead and created an issue on diego-release so that the community has a chance for contributing. Closing this issue.

@c0d1ngm0nk3y
Copy link
Author

If you'd like to install the binary, bbs repo is meant to be installed via diego-release.

We are not using bosh. Using a bosh to be the only possibility to install a go binary sounds really strange. This repo cannot even be built...

What is the downside of adding a go.mod file?

It would

a) Allow the repo to be built independently
b) Allow go install

@winkingturtle-vmw
Copy link
Contributor

winkingturtle-vmw commented Jun 5, 2024

I am not sure what you mean by "using bosh". The bbs repo is managed by a higher level repo. You are not using bosh cli/director in this case, you are just using the path for the release to get the right set of dependencies.

What is the downside of adding a go.mod file?

This will break the diego-release, since it's using a path based module import to use this repositories.

@MarcPaquette
Copy link
Contributor

@c0d1ngm0nk3y ,

We do have long term plans to change the way we go mod'd our release, but at this time we're in a bit of a tangled web. Putting a go.mod on this repo would have consequences elsewhere in a way that we're not fully ready to deal with yet.

We understand this is not an ideal scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants