Hi Antonio (and anybody else that understands the technical problem involved here),

I've been reading the whole thread and it seems to me that the reason, why Rust/Go build-time "libraries" need to be handled differently from all the other existing stuff in the world and that "no user ever wants to use" the Debian-provided build-time Rust/Go libraries has not been spelled out in plain, comprehensible english yet.

So since you seem to understand a bit about the technical problem involved here and I'd very much appreciate if you could spell it out. I think it would benefit the project as then everybody would be able to understand what this new section is about.

So let me ask a question that could maybe clear things up:

On 11.11.20 14:39, Antonio Terceiro wrote:

In the Rust world there is no such thing as installing a library
globably. A crate that provides a library can only be used to build
other stuff, and is never made available globally. "cargo install" only
applies to creates that provide binaries:

https://doc.rust-lang.org/cargo/commands/cargo-install.html

[I've read the cargo-install.html document in the past but not re-read it now]

So let's say user joe wants to code Go software that depends on Go's third party github.com/tazjin/kontemplate/templater package ("package" in Go's taxonomy not in Debian's!).

Then he'd `export GOPATH=~/src/go` and `go get github.com/tazjin/kontemplate`. Go would then `git clone` everything under `~/src/go/src/github.com/tazjin/kontemplate/`.

So far so good and I think Rust has a similar mechanisms with cargo, right?

Now given that alice wants to package joe's software. She'll do the above plus `go get github.com/joe/joes_app`. All will be under `~/src/go/src/github....`.

The naive thing to do now would be to move `~/src/go/src/` to `/usr/lib/go` and package that as `go-tazjin-kontemplate-dev_0.1.deb` or similar.

Debian's automatic build process for "joes_app" would first install `go-tazjin-kontemplate-dev_0.1.deb`, then make a symlink from `~/src/go/src/github.com/tazjin` (or `~/.local/go` or whereever Go expects its stuff by default) to `/usr/lib/go/src/github.com/tazjin` and build and be done.

A user wanting to develop software based on tazjin's stuff would do the same: `apt-get install go-tazjin-kontemplate-dev`, symlink, done.

This solution seems to be too trivial that nobody would have though of it, so what is it that I (and I guess many Debianers) are missing?
*t

Reply via email to