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

Rearrange Go modules #4686

Closed
claudio4j opened this issue Aug 22, 2023 · 2 comments · Fixed by #4690
Closed

Rearrange Go modules #4686

claudio4j opened this issue Aug 22, 2023 · 2 comments · Fixed by #4690

Comments

@claudio4j
Copy link
Contributor

Given the recent problem with the go module in camel-k 2.0, I see there is a problem related to the way the camel-k modules are defined and published,

There are the following modules

pkg/client/camel/go.mod:
  module github.com/apache/camel-k/v2/pkg/client/camel

pkg/apis/camel/go.mod:
    module github.com/apache/camel-k/v2/pkg/apis/camel

pkg/kamelet/repository/go.mod:
    module github.com/apache/camel-k/v2/pkg/kamelet/repository

go.mod:
    module github.com/apache/camel-k/v2

go modules documentation
https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories

These additional modules were created as a way to let the camel api to be imported independent of the camel-k-operator packages, but we haven't seen other projects importing the camel apis specifically.
Also, the other modules are sub-directories of the main go module, which seems to be not a good practice.

In name of making the project easier to maintain and release I propose to remove the modules from the subtree and have only the root module.

Note that any other project importing camel go apis, using the main module as github.com/apache/camel-k/v2

@lburgazzoli
Copy link
Contributor

@astefanutti what do you think ?

@squakez
Copy link
Contributor

squakez commented Aug 23, 2023

Be mindful of the relationship that each module have with each other. I made some experiments in the past [1] and I was not able to have a full working version. I am okey with the proposal, we cannot have a repo only for API IMO. During development make sure to solve all the release process which are now in charge to sync the versioning among the modules.

[1] #4086 (comment)

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

Successfully merging a pull request may close this issue.

3 participants