RejectedSoftware Forums

Sign up

Pages: 1 2 3 4

Re: Questions about how DUB works

On Sat, 14 Sep 2013 12:07:32 GMT, Jacob Carlborg wrote:

On Wed, 11 Sep 2013 13:39:10 +0200, Sönke Ludwig wrote:

Somehow I managed to skip this... DVM is something that I've actually
thought about how it could be meaningfully integrated. I already wanted
to ask you, but wasn't sure enough how exactly to go about it (questions
like support for GDC/LDC to not make them more second class than they
should be came up).

Currently DMD is only supported. At least when it comes to automatically download and install. As far as I know neither LDC or GDC has a site/FTP listing all available releases. Also I'm not sure if even GDC provides pre-compiled binaries. Compiling GDC or LDC will complicate things, a lot.

So in case of GDC/LDC outputting a warning may be good enough to point the user into the right direction. Hm, actually I don't even know how to e.g. get the proper GDC version as opposed to the underlying GCC version.

Only a manually maintained compiler compatibility field is something
that I fear will not work out (people being lazy or too slow with
updates and possibly using different compilers). But if this would be
combined with a CI that automates compatibility checks this would get
really interesting.

That's a good idea. Specifying a minimum supported version might be a good idea (this might not change that often) and if not all compilers are supported. The the latest working compiler version could be figured out as you've described above.

Do you think that travis-ci is a viable option for automatically handling potentially hundreds or thousands of packages? Depending on the available capacity, the specified minimum version could be automatically checked for validity, too.

But I think a minimum version is ok for well maintained projects. At least personally I usually try to retain that version until something forces me to lift it, so I could as well document it.

Re: Questions about how DUB works

On 2013-09-15 12:43, Sönke Ludwig wrote:

Finally got NNTP working :)

Since the default build type is "debug" that should definitely be included. Executing the equivalent of "dub build" and "dub build --build=release" for each newly installed package would basically do this. Once a better build system is in place that would be an option.

As far as I know, the only thing the -debug flag does is enable the
"debug" statements. Most of the use cases I have seen prints some
information to the console. I would really hate to have that by default.
That's only useful when one needs to debug a third party package which
doesn't behave as it's supposed to. I think that by default we should
assume that they do behave as they're supposed to.

What is useful is to have debug symbols, that is the -g or -gc flag.

Difficult call with the branches and starting tracking just after the first version tag. It would be a lot cleaner, but on the other hand there are a lot of packages now where the author doesn't feel comfortable yet to start tagging versions (even if that is an unjustified feeling). IF we end up with half the number of packages by forcing version tags, that would arguably be worse overall for the system.

Hmm.. maybe a little psychological trick can help here: non-tagged packages could always occur after tagged packages in the list (assuming that they are in a pre-release state) or get some kind of visual "beta" tag, so that the author is kindly forced to start making tagged versions to get more people to use their packages.

A "beta" flag or similar might be a good idea. Possibly a button to
show/hide these beta packages. The idea of sorting non-tagged package
last is also good.

We should come up with a better name than "beta" since according to the
semantic versioning scheme you're allowed to have versions like
"0.2.0-beta", "0.2.0-alpha" and "0.2.0-rc1".

True, but I also often have the situation with vibe.d that a quick fix is needed for someone and making a release would be too much effort. But maybe in that situation I should start thinking more about pre-release versions (e.g. "0.7.18-pre.1"). I'm not even sure if and how these are currently matched by DUB when using ">=0.7.17".

You don't want a pre-release tag for every new commit :)

Comparing with Bundler again. In this case one would be forced to
specify the fully git repository.

Standard bundler:

git "rails", "4.0.0"

Track git HEAD:

git "rails", github: "rails/rails"

Or when it's not on github:

git "rails", git: "git@github.com:rails/rails.git"

http://bundler.io/v1.3/git.html

/Jacob Carlborg

Re: Questions about how DUB works

On 2013-09-15 13:06, Sönke Ludwig wrote:

So in case of GDC/LDC outputting a warning may be good enough to point the user into the right direction.

Yes.

Hm, actually I don't even know how to e.g. get the proper GDC version as opposed to the underlying GCC version.

Me neither.

Do you think that travis-ci is a viable option for automatically handling potentially hundreds or thousands of packages? Depending on the available capacity, the specified minimum version could be automatically checked for validity, too.

Hundreds absolutely. Thousands, it will handle that as well, but I would
probably contact them about that first. It already handle thousands of
projects but I would say that it's a bit different if a thousand
developers add one new project or if one developer add a thousand new
projects.

From their site:

"Travis CI has run 2,729,247 tests for 23,102 open-source projects to
date, including Ruby, Rails, Rubinius, Rubygems, Bundler, Leiningen,
Parrot, Symfony, ..."

https://love.travis-ci.org/

But I think a minimum version is ok for well maintained projects. At least personally I usually try to retain that version until something forces me to lift it, so I could as well document it.

Since I'm using DVM I'm calling it from my build scripts. It both
automatically uses the correct compiler when building and documents
which version is required.

/Jacob Carlborg

Re: Questions about how DUB works

Am 15.09.2013 13:20, schrieb Jacob Carlborg:

On 2013-09-15 12:43, Sönke Ludwig wrote:

Finally got NNTP working :)

Since the default build type is "debug" that should definitely be
included. Executing the equivalent of "dub build" and "dub build
--build=release" for each newly installed package would basically do
this. Once a better build system is in place that would be an option.

As far as I know, the only thing the -debug flag does is enable the
"debug" statements. Most of the use cases I have seen prints some
information to the console. I would really hate to have that by default.
That's only useful when one needs to debug a third party package which
doesn't behave as it's supposed to. I think that by default we should
assume that they do behave as they're supposed to.

What is useful is to have debug symbols, that is the -g or -gc flag.

In this case "debug" means both, -debug and -g/-gc, but I agree that -g
is the important one.

Difficult call with the branches and starting tracking just after the
first version tag. It would be a lot cleaner, but on the other hand
there are a lot of packages now where the author doesn't feel
comfortable yet to start tagging versions (even if that is an
unjustified feeling). IF we end up with half the number of packages by
forcing version tags, that would arguably be worse overall for the
system.

Hmm.. maybe a little psychological trick can help here: non-tagged
packages could always occur after tagged packages in the list
(assuming that they are in a pre-release state) or get some kind of
visual "beta" tag, so that the author is kindly forced to start making
tagged versions to get more people to use their packages.

A "beta" flag or similar might be a good idea. Possibly a button to
show/hide these beta packages. The idea of sorting non-tagged package
last is also good.

We should come up with a better name than "beta" since according to the
semantic versioning scheme you're allowed to have versions like
"0.2.0-beta", "0.2.0-alpha" and "0.2.0-rc1".

Maybe just "unversioned" and slightly grayed out or similar?

True, but I also often have the situation with vibe.d that a quick fix
is needed for someone and making a release would be too much effort.
But maybe in that situation I should start thinking more about
pre-release versions (e.g. "0.7.18-pre.1"). I'm not even sure if and
how these are currently matched by DUB when using ">=0.7.17".

You don't want a pre-release tag for every new commit :)

Comparing with Bundler again. In this case one would be forced to
specify the fully git repository.

Standard bundler:

git "rails", "4.0.0"

Track git HEAD:

git "rails", github: "rails/rails"

Or when it's not on github:

git "rails", git: "git@github.com:rails/rails.git"

http://bundler.io/v1.3/git.html

Okay but that's not that much different from using "~master". I think
the most important achievement is to minimize the number of packages
without version tags. At least I'd assume that people would
automatically stay with version based dependencies if possible when all
they see in the registry has versions.

Re: Questions about how DUB works

On 2013-09-15 13:56, Sönke Ludwig wrote:

Maybe just "unversioned" and slightly grayed out or similar?

Sounds like a good name.

Okay but that's not that much different from using "~master".

No, that's the exact thing. The big difference is that only releases
with version numbers are listed in the RubyGems registry.

Say I want to use git HEAD of the "rails" package and don't know the git
repository.

  1. Go to http://rubygems.org (the registry, corresponds to code.dlang.org)

  2. Search for "rails" and click the package found

  3. Click "source code"

  4. Now on github copy the repository URL

  5. Copy that to the Gemfile used by Bundler

Just specifying a package name using Bundler:

gem "rails"

You will always get the latest version. You'll never get git HEAD. In my
opinion it does the right thing by default.

I think the most important achievement is to minimize the number of packages
without version tags. At least I'd assume that people would
automatically stay with version based dependencies if possible when all
they see in the registry has versions.

I agree.

/Jacob Carlborg

Re: Questions about how DUB works

On Sat, 14 Sep 2013 12:12:02 GMT, Jacob Carlborg wrote:

On Wed, 11 Sep 2013 17:51:56 GMT, Dicebot wrote:

No way. You just can't do it properly without lot of efforts (infrastructure efforts, not development) and introducing yet another broken package manager is not good idea.

It's not that hard, just put all the binaries in a directory and add it to PATH. What's the point in having a package manager that only clones a repository? What does it give me that git already doesn't?

Simply having random folder added to PATH is exactly kind of unhygienic hack I don't like to see. I know that this approach is a usual way to do things on Mac but on my Linux machine I don't want a single binary out of build dir that is not known to core OS package manager ;) It does not matter if it is development tool. I think dub approach with no actual installation but setting required environment instead is more hygienic (if I understand it right).

Also in my opinion simply cloning the repository is exactly what needs to be done in most cases. Language-specific package manager is just some syntax sugar on top which help to pull exactly the repository and tag you need.

Re: Questions about how DUB works

P.S. I do consider the very existence of dub install a disaster.

Re: Questions about how DUB works

On 2013-09-16 15:03, Dicebot wrote:

Simply having random folder added to PATH is exactly kind of unhygienic hack I don't like to see. I know that this approach is a usual way to do things on Mac but on my Linux machine I don't want a single binary out of build dir that is not known to core OS package manager ;) It does not matter if it is development tool.

What so bad about that?

I think dub approach with no actual installation but setting required environment instead is more hygienic (if I understand it right).

What do you mean with "setting required environment"?

Also in my opinion simply cloning the repository is exactly what needs to be done in most cases. Language-specific package manager is just some syntax sugar on top which help to pull exactly the repository and tag you need.

I just don't agree with that. You also seem to keep forgetting that
there are platforms which don't have a package manager installed by default.

/Jacob Carlborg

Re: Questions about how DUB works

On 2013-09-16 15:09, Dicebot wrote:

P.S. I do consider the very existence of dub install a disaster.

I think it's even more a disaster to have a package manager that doesn't
install packages. If I cannot do "dub install foo && foo --help" it's
less that useless. Most users will be extremely confused about that.

Also don't forget to remove all target types. If a package isn't
compiled or installed it's basically a source library.

/Jacob Carlborg

Re: Questions about how DUB works

On Thu, 19 Sep 2013 22:03:40 +0200, Jacob Carlborg wrote:

On 2013-09-16 15:03, Dicebot wrote:

Simply having random folder added to PATH is exactly kind of unhygienic hack I don't like to see. I know that this approach is a usual way to do things on Mac but on my Linux machine I don't want a single binary out of build dir that is not known to core OS package manager ;) It does not matter if it is development tool.

What so bad about that?

It can't be used to satisfy dependencies for other packages. It is not possible to easily query all files belonging to it in a standard manner. It is not applicable for cross-language tools. It offers nothing over existing system built into my OS. It creates inconvenient fragmentation when multiple languages come into question.

I think dub approach with no actual installation but setting required environment instead is more hygienic (if I understand it right).

What do you mean with "setting required environment"?

Instead of installing libraries globally, simply provide required -I and -L switches to dmd upon build based on dependency list.

Also in my opinion simply cloning the repository is exactly what needs to be done in most cases. Language-specific package manager is just some syntax sugar on top which help to pull exactly the repository and tag you need.

I just don't agree with that. You also seem to keep forgetting that
there are platforms which don't have a package manager installed by default.

I remember it but it is not a D problem to solve. Or any other language. It is a common desire among the developers to consider their language a first class citizen and OS a second class one but in practice it is always other way around.

Actually, I have heard of quite mature generic package manager implementations for both Mac and Win, those just don't get any traction / recognition.

Pages: 1 2 3 4