Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Simplify mounting of project sources to plugins

In Go world projects are located by the GOPATH. Usually, GOPATH env var is exported in bash profile or so. E.g. export GOPATH=/home/user/go
After that Go compiler and utils follow next structural location of files:
$GOPATH/src <- projects AND dependencies (though dependencies not always go here)
$GOPATH/bin <- compiled and packaged Go apps (usually added to PATH to launch tools from it, often used for go based linters and other Go related tools)
$GOPATH/src contains folders that represent Go packages and usually include source hosting like github.com or golang.org.
For example, when I'm working on Che broker repo my path is $GOPATH/src/github.com/eclipse/che-plugin-broker or /home/gaal/workspace/go/src/github.com/eclipse/che-plugin-broker on my system in particular.
All the Go tools like linters, compiler, and others expect GOPATH to be populated in the system and structure to be respected. 

Hope it helps. If not, please, let me know.

On Tue, Jan 22, 2019 at 2:36 PM <tmader@xxxxxxxxxx> wrote:
On Tue, 2019-01-22 at 13:01 +0100, Mario wrote:
There are 2 user stories here:

1) As a Che user I want to be able to mount the source code without the need to specify a volume name because I may not know that Che uses a particular naming convention (i.e. project) and I can misspell it and spend hours figuring out what the problem is 
2) As a Che user I would like to specify the source code path in a specific container (the default is /project/) of my workspace because some runtimes included in my container (e.g. go) expect the source to be in a precise path 

Before discussing the implementation details (i.e. the devfile syntax) do we have an agreement on these 2 user stories? 

No, I don't agree: what the user wants is for the language support to work out of the box. The fact that we mount a volume for the language server to use in the sidecar is an implementation detail. In the case of Go: if the user needs to mount the source code in a particular location (lets say "/foo/bar/zoz") he should say so once in the workspace configuration (or if there is no choice where to put it, it should be set by the language plugin) and all containers should pick up on that and do the right thing.

/Thomas
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/che-dev


--

OLEKSANDR GARAGATYI

SENIOR SOFTWARE ENGINEER

Red Hat 


Back to the top