April 26, 2022

On 4/26/22 5:38 PM, deadalnix wrote:

>

On Tuesday, 26 April 2022 at 19:29:31 UTC, Steven Schveighoffer wrote:

>

The solution is not to bring everyone down to your misery though. "If I can't have a good experience with what I want, nobody should" isn't the right answer.

I'm not bringing anyone anywhere. You want to use make? Good. cmake/ninja? Good. Scons? Good. A custom build script? Good.

I really don't what you use.

I DO care about dub because dub doesn't provide me with a good way to work with it without dubifying everything.

I'm perfectly fine with projects not using dub. Don't listen to people who cry about dub usage.

>

See I lead a project that uses cmake/ninja. It has dependencies using autotools, cmake, qmake, and even some that uses their own thing. None of that causes any significant problems.

And I lead projects that use dub. People have asked me to include meson build files in some cases. And I've obliged, but I hate maintaining it (most important reason -- meson build file must be manually updated to match git tag). I'd rather just get rid of them, and if you don't want to use dub to build my projects, then roll your own fork.

>

But dub don't just want to build the thing or do dependency management. Dub is the true way to enlightenment. You have to do it all the dub way or be in a world of pain.

Don't use dub, no enlightenment necessary.

>

All I'm asking is that you sub guy recognize for other the same thing as you are now requesting for yourself: don't impose a way of doing things on me because it is the one true way™.

I'm not. I said this from my first post on this unreasonably long thread, I don't care what you use, D does not require you to use dub to build.

-Steve

April 26, 2022

On Tuesday, 26 April 2022 at 22:08:27 UTC, Steven Schveighoffer wrote:

>

I'm perfectly fine with projects not using dub. Don't listen to people who cry about dub usage.

You are missing the important part. Because dub do not play nice with anything else, that means we might as well use a different language. My D code can never talk to your D code without an absurd amount of time, energy and effort expanded.

You apparently had a small taste of that with meson. I ended discarding meson as an option for reason similar to dub - and reasons you are experiencing now: meson doesn't play nice with other kids.

Except meson is kinda asocial, while dub is more like the Westboro Baptist Church.

April 26, 2022

On Tuesday, 26 April 2022 at 07:37:42 UTC, Ola Fosheim Grøstad wrote:

>

On Tuesday, 26 April 2022 at 01:56:42 UTC, norm wrote:

>

Conan works with either packaged binaries or packaged sources. I think the comparison is valid. I also disagree that dub is easier. Sure it is much simpler to get started for trivial projects but with any non-trivial project you end up hitting its walled garden pretty hard.

My (limited) understanding of Conan is that Conan-central compiles packages to binaries for various configurations (over 100 configurations for C++), but that it also allows for packaging of precompiled binaries. Isn't this a security hazard?

No more than anything else like maven, linux package managers, chocolatey on windows. I hear vcpkg also supports prebuilt binaries now but I think it is only for private registries, they're not hosting them. Vcpkg is focused on build from source not because of security concerns but ABI and compiler compatibility.

It is also fairly easy, much more than pip or maven, to set up your own package registry server so it never goes out to he official hosted service for packages.

>

Is it possible to configure Conan so that it only compiles from sources and never downloads binaries?

When you invoke conan, or in your config file, you can tell it to only build from source so it will not download the binary package even if available.

April 26, 2022

On 4/26/22 6:50 PM, deadalnix wrote:

>

On Tuesday, 26 April 2022 at 22:08:27 UTC, Steven Schveighoffer wrote:

>

I'm perfectly fine with projects not using dub. Don't listen to people who cry about dub usage.

You are missing the important part. Because dub do not play nice with anything else, that means we might as well use a different language. My D code can never talk to your D code without an absurd amount of time, energy and effort expanded.

Define "absurd". You want to include version flags that might be in my dub file? They are in there, not hard to read. You want to include the library? Build with dub build in my repo, and then you have the lib available. All my files are in my source directory. Is that hard to use?

Dub does not use extraneous build pieces. All it does is construct a valid compilation line. You can mimic that line without (IMO) an absurd amount of effort.

With dmd -i, you can pretty much just ignore dub and just use the proper -I directories, I can't imagine this will be extremely difficult.

None of this is to say that it's not work, or that it's seamless. But it's not any less seamless than if dub didn't exist.

>

You apparently had a small taste of that with meson. I ended discarding meson as an option for reason similar to dub - and reasons you are experiencing now: meson doesn't play nice with other kids.

Nah, my experience was never with using meson, my experience was with CI and meson. In other words, I'd update my library, tag it, and it's ready for dub. But meson also needs me to duplicate the tag in its build file, or it doesn't work. That is junk. Imagine this workflow:

  1. create your update
  2. Use CI on your PR, it works
  3. Merge to master
  4. Tag for release
  5. Master CI now breaks because meson wasn't satisfied.

i.e. you can't run CI until you've tagged the release.

I asked, can you make Meson automatically use the tagged version? Answer is no. So I really am regretting merging that file, and probably will just take it out of CI unless someone cares.

>

Except meson is kinda asocial, while dub is more like the Westboro Baptist Church.

This is an insanely overexxagerated analogy.

-Steve

April 27, 2022

On Tuesday, 26 April 2022 at 23:48:03 UTC, norm wrote:

>

No more than anything else like maven, linux package managers, chocolatey on windows. I hear vcpkg also supports prebuilt binaries now but I think it is only for private registries, they're not hosting them.

I think it comes down to credible management and vetting strategies. My impression from Debian stable (when I used it regularly) was that they took security very seriously and made it hard for rogue binaries to make it into the repo. It also helps to have a million critical and skilled users that are eagerly looking for flaws!

In contrast, I am much more critical of pip/Python and either avoid less known packages from pip or vet the code before executing it.

>

When you invoke conan, or in your config file, you can tell it to only build from source so it will not download the binary package even if available.

Thanks, I might have look at Conan then… :)

(I guess it is ok if the binaries are reproducible and built on a secure cloud solution and not by individual contributors, but it still sounds like a risk to my ears.)

April 27, 2022

On Wednesday, 27 April 2022 at 00:51:08 UTC, Steven Schveighoffer wrote:

> >

Except meson is kinda asocial, while dub is more like the Westboro Baptist Church.

This is an insanely overexxagerated analogy.

What it boils down to is that it is beneficial for the eco system that all D users have an equal opportunity to share and market their projects through the official channels.

Maybe Dub should be a brick in a larger system, rather than the opposite. That way people with simple needs can stick to Dub and people who draw on non-D resources can get equal opportunities.

Some sort of extensible agnostic meta-packaging system that can draw in resources from Conan, Dub etc.

April 27, 2022
On Tuesday, 26 April 2022 at 20:30:59 UTC, H. S. Teoh wrote:
> On Wed, Apr 27, 2022 at 07:23:16AM +1200, rikki cattermole via Digitalmars-d wrote:
>> 
>> On 27/04/2022 7:15 AM, Alexandru Ermicioi wrote:
>> > On Tuesday, 26 April 2022 at 18:47:44 UTC, H. S. Teoh wrote:
>> > > Well, so it looks like the time is ripe to break dub out of its original limitations and extend its scope to other languages. (And other build-like tasks, in general. ;-))
>> > 
>> > Would be nice if it will use plugin based arch, so that even currently supported features could be extracted into plugins, just like gradle or maven if you're from java world, and be easy for the public to add additional custom functionality as plugins to it without messing the internals.
>
> Totally.  A plugin-based system like gradle would work.
>
>
>> Right now shared library support is simply not at the level required to do this.
> [...]
>
> But why does a plugin system need to be based on shared libraries?

I think the reason is that dub will have to compile itself with declared plugins first in order to be able to execute them, if no shared libs are used.

>
> Why not expand dub's DSL to be able to encode the kind of functionality needed to write external plugins, then rewrite existing functionality in terms of that DSL as a plugin?  Then others can also write plugins in the same DSL, and you wouldn't need to recompile dub just to add a plugin.  Just download the plugin description file into some standard dub directory, and dub would pick it up upon startup.

Dub is more like maven from java world. I.e. it uses declarative approach to define a project and how to build it.

Code based config build systems in D are more like gradle, since gradle dsl is just plain groovy with some ast macros.

Btw, the idea with artifact repo support in dub is good. We should apply it to dub repos and replace current fetching from git with it. Then we could upload semi built packs as well as fully built ones.

The point of semi built ones being that they should be compile-able in straightforward manner by people downloading them, with everything else pre-built.

Then all this dissatisfaction might disappear, since you could use any build system you'd want for your lib, and should be able to integrate semi built format easily with your tool of choice too if you use a lib from dub repository.

April 27, 2022
On Tuesday, 26 April 2022 at 21:16:00 UTC, H. S. Teoh wrote:
[...]
> even if dub is absent.

What scenario would that be? Dub is distributed with the compiler.

-- Bastiaan.

April 27, 2022

On Wednesday, 27 April 2022 at 06:48:48 UTC, Ola Fosheim Grøstad wrote:

> >

When you invoke conan, or in your config file, you can tell it to only build from source so it will not download the binary package even if available.

Thanks, I might have look at Conan then… :)

(I guess it is ok if the binaries are reproducible and built on a secure cloud solution and not by individual contributors, but it still sounds like a risk to my ears.)

Seems like vcpkg has expanded their scope, by automatically downloading compilers, linkers and SDKs for embedded development:

https://devblogs.microsoft.com/cppblog/vcpkg-artifacts/

>

«The experience is in preview and currently focused on embedded developers. We will expand the scope in the future to include any developers targeting Linux, macOS, or Windows.»

Not sure how they plan to ensure the quality/security of this approach, but I guess Microsoft can afford to pay staff to do the auditing (if they do it).

It would be a grave mistake to try to replicate any of this for a small player like the D community. It would be better to get LDC and other dependencies into vcpkg.

April 27, 2022

On Tuesday, 26 April 2022 at 12:47:56 UTC, Ola Fosheim Grøstad wrote:

>

On Tuesday, 26 April 2022 at 11:00:26 UTC, JN wrote:

>

On Saturday, 23 April 2022 at 20:15:27 UTC, deadalnix wrote:

>

Ho, you wanted to distribute a package? Well, now you have a new build system. make was working great for you? Too bad. Can dub run make? It doesn't look like it but who knows. I don't.

Does your makefile support other platforms than Linux? How about Windows? Makefiles aren't even native for Windows.

Is this still an issue? Doesn't winget fix this?

Indeed, not native. Are you suggesting Dub should include winget?

-- Bastiaan.