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

[BUG] Orchestrion fails to run outside of go module tree #434

Closed
eliottness opened this issue Nov 28, 2024 · 2 comments
Closed

[BUG] Orchestrion fails to run outside of go module tree #434

eliottness opened this issue Nov 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@eliottness
Copy link
Contributor

Describe what happened:

Orchestrion fails to run standalone binary outside of a go.mod tree

Describe what you expected:

I would expect the package to run and build fine.

Steps to reproduce the issue:

❯ cd /tmp
❯ go run github.com/gohugoio/hugo@latest --help
[... outputs the help test ...]

❯ orchestrion go run github.com/gohugoio/hugo@latest       
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                      │
│  Warning: github.com/DataDog/orchestrion is not present in your go.mod file.                                         │
│  In order to ensure build reliability and reproductibility, orchestrion will now add itself in your go.mod file by:  │
│                                                                                                                      │
│      1. creating a new file named orchestrion.tool.go                                                                │
│      2. running go get github.com/DataDog/orchestrion@v1.0.0                                                         │
│      3. running go mod tidy                                                                                          │
│                                                                                                                      │
│  You should commit the resulting changes into your source control system.                                            │
│                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Failed to pin orchestrion in go.mod: getting GOMOD: in "/tmp": `go env GOMOD` returned a blank string

Additional environment details (Version of Go, Operating System, etc.):
Version of orchestrion: v1.0.0
Tested on MacOS and Linux
Also fails the same in TOOLEXEC and GOFLAGS mode in addition with the DRIVER mode of orchestrion

@eliottness eliottness added the bug Something isn't working label Nov 28, 2024
@RomainMuller
Copy link
Contributor

Off the bat, I' don't think this is a use-case we can support (we should probably refrain from making modifications into the GOMODCACHE tree)...

I guess the best way forward (short of a breakthrough idea) is to detect this and gracefully fail (providing an explanation).

@eliottness
Copy link
Contributor Author

One of orchestrion underlying features is injecting dependencies at link time since the go toolchain does not allow us to do it in a cooperative way. But resolving these new dependencies without a go.mod and go.sum db available create issues like #433

Therefore we decided to delay this feature for an undetermined about of time. Feel free to like a 👍 on this comment if you came across this asking for this specific feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants