www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Testing with nearly all packages in code.dlang.org

reply Atila Neves <atila.neves gmail.com> writes:
In the spirit of avoiding any further breakage, I wrote a little 
D script to get a list of all dub packages that still build since 
projects get stale. It took ~44min on my laptop using 20 threads 
to try and build all 2381 (as of yesterday) dub packages. This 
included downloading all of them, I did an `rm -rf 
~/.dub/packages` just before.

1362 of them returned 0 for `dub build`, or about 57%. It's 
probably a good idea to actually do `dub build --build=unittest` 
since that'll include more D code.

I don't know if some of them fail because they need custom 
build/CI; I think it's safe to ignore them even if that's the 
case, since a dub package needs to just build with dub.

The list and the code is at 
https://github.com/atilaneves/all-dub-packages.
Sep 19 2023
next sibling parent reply Adam D Ruppe <destructionator gmail.com> writes:
On Tuesday, 19 September 2023 at 21:37:32 UTC, Atila Neves wrote:
 1362 of them returned 0 for `dub build`, or about 57%. It's 
 probably a good idea to actually do `dub build 
 --build=unittest` since that'll include more D code.
It is vital to try the various subpackages to get decent coverage; dub build ignores them unless they are declared as explicit dependencies on the top level thing.
Sep 19 2023
parent Atila Neves <atila.neves gmail.com> writes:
On Tuesday, 19 September 2023 at 21:44:11 UTC, Adam D Ruppe wrote:
 On Tuesday, 19 September 2023 at 21:37:32 UTC, Atila Neves 
 wrote:
 1362 of them returned 0 for `dub build`, or about 57%. It's 
 probably a good idea to actually do `dub build 
 --build=unittest` since that'll include more D code.
It is vital to try the various subpackages to get decent coverage; dub build ignores them unless they are declared as explicit dependencies on the top level thing.
That's usually the case though, no? Other than manually crawling through the filesystem after downloading the package for dub.sdl/dub.json files I don't know how to do this generally. And even then that might not work because they might not be meant to be used that way. This is a lot more coverage than before though, but of course I'm open to suggestions on how to avoid breakage even further.
Sep 19 2023
prev sibling parent reply Andrea Fontana <nospam example.org> writes:
On Tuesday, 19 September 2023 at 21:37:32 UTC, Atila Neves wrote:
 In the spirit of avoiding any further breakage, I wrote a 
 little D script to get a list of all dub packages that still 
 build since projects get stale. It took ~44min on my laptop 
 using 20 threads to try and build all 2381 (as of yesterday) 
 dub packages. This included downloading all of them, I did an 
 `rm -rf ~/.dub/packages` just before.

 1362 of them returned 0 for `dub build`, or about 57%. It's 
 probably a good idea to actually do `dub build 
 --build=unittest` since that'll include more D code.

 I don't know if some of them fail because they need custom 
 build/CI; I think it's safe to ignore them even if that's the 
 case, since a dub package needs to just build with dub.

 The list and the code is at 
 https://github.com/atilaneves/all-dub-packages.
What if some of them contain malicious code in the pre-build phase or in unit tests? I wouldn't run that massive indiscriminate build :) Andrea
Sep 29 2023
next sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 29 September 2023 at 08:00:15 UTC, Andrea Fontana 
wrote:
 On Tuesday, 19 September 2023 at 21:37:32 UTC, Atila Neves 
 wrote:
 [...]
What if some of them contain malicious code in the pre-build phase or in unit tests? I wouldn't run that massive indiscriminate build :) Andrea
Real men run unknown code 🦸
Sep 29 2023
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Friday, 29 September 2023 at 08:30:22 UTC, Imperatorn wrote:
 Real men run unknown code 🦸
And smart men only run unknown code that is proven to not have any side effects. ;)
Oct 06 2023
prev sibling parent Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Friday, September 29, 2023 2:00:15 AM MDT Andrea Fontana via Digitalmars-d 
wrote:
 On Tuesday, 19 September 2023 at 21:37:32 UTC, Atila Neves wrote:
 In the spirit of avoiding any further breakage, I wrote a
 little D script to get a list of all dub packages that still
 build since projects get stale. It took ~44min on my laptop
 using 20 threads to try and build all 2381 (as of yesterday)
 dub packages. This included downloading all of them, I did an
 `rm -rf ~/.dub/packages` just before.

 1362 of them returned 0 for `dub build`, or about 57%. It's
 probably a good idea to actually do `dub build
 --build=unittest` since that'll include more D code.

 I don't know if some of them fail because they need custom
 build/CI; I think it's safe to ignore them even if that's the
 case, since a dub package needs to just build with dub.

 The list and the code is at
 https://github.com/atilaneves/all-dub-packages.
What if some of them contain malicious code in the pre-build phase or in unit tests? I wouldn't run that massive indiscriminate build :)
If there are concerns about that sort of thing, then it's easy enough to do it all in an appropriately restricted environment where malicious stuff won't matter, because it won't impact anything outside of that environment. - Jonathan M Davis
Oct 01 2023