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

chore: fix go.mod add go.work #1426

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

ccoVeille
Copy link
Contributor

@ccoVeille ccoVeille commented Jan 21, 2025

The relative path in go.mod used in file datasource modules
This caused an error when the repository was named something else than "gofr".

Please note, I'm not even sure there is a logic to use relative path now the dev is over.

Also add missing go.work files
I'm not even sure how the project could be managed without this.
I'm sure there are some part of the CI that could be deleted now the go.work file is present

The path were relative to the root of the project.
This caused an error when the repository was named something else than "gofr".
You can use the following command to sync all go.mod and go.sum files:

$ go work sync
@ccoVeille ccoVeille changed the title chore: fix relative path in go.mod used in file datasource modules chore: fix go.mod add go.work Jan 21, 2025
@ccoVeille
Copy link
Contributor Author

Please note the go test ./... and golangci-lint run are now launched on everything as they should

so the CI about "sub modules" should be removed

Let's talk about it here.

replace gofr.dev => ../../../../../../gofr
toolchain go1.23.4

replace gofr.dev => ../../../../..
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys, please help me to figure out why this was kept here, and not in other modules

It looks like a left behind thing

@ccoVeille ccoVeille marked this pull request as draft January 21, 2025 22:09
@ccoVeille
Copy link
Contributor Author

ccoVeille commented Jan 21, 2025

I think the next step should be done:

  • remove the relative path hack in pkg/gofr/datasource/file/*/go.mod
  • remove everything in CI about looking for go.mod files and perform go test or golangci-lint run

Everything works without them now there is a go.work file

https://go.dev/doc/tutorial/workspaces

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 this pull request may close these issues.

1 participant