arsd users: weigh in on proposed breaking change

Adam D Ruppe destructionator at gmail.com
Mon Dec 19 21:56:37 UTC 2022


On Monday, 19 December 2022 at 19:57:24 UTC, Guillaume Piolat 
wrote:
> Besides, it can be non-breaking when using dub subpackages, 
> using sourceFiles.

Yeah, the dub users probably won't notice it at all, since I'll 
add the dependency to the subpackage in my config.

But sourceFiles btw isn't great for this since you can end up 
with multiple definitions of things if people use multiple 
subpackages together. I've found the best way to do it is to make 
each module that can be used alone into its own subpackage and 
then list that as a dependency.

It is a huge hassle to essentially reinvent what the compiler 
does natively... but it also seems to avoid the most problems 
when people do start mix and matching. And that's something I 
still will continue to support - while I provide a little of 
everything, I try not to force you to buy into my worldview just 
to use a little bit. If you like my png.d but not my 
simpledisplay.d, that's ok, they work well together but they also 
work just fine independently. Or if you like my simpledisplay but 
prefer your own image formats lib, it shouldn't be too hard to 
make adapters for the interfaces since I still try to keep things 
decoupled.

Just at the same time, having a common core to import that 
defines a few of these interfaces helps with that interop too, 
which is why I'm looking at this.


More information about the Digitalmars-d mailing list