Raku / tap-harness6

A TAP harness for Raku
Artistic License 2.0
8 stars 15 forks source link

Remove multiple references to same library file #41

Closed thundergnat closed 2 years ago

thundergnat commented 3 years ago

Drastically slows down compilation as it recompiles the library for every mention of it in the provides section. It only needs to compile it once.

see this comment (https://github.com/rakudo/rakudo/issues/4353#issuecomment-833513796

on Rakudo issue

ugexe commented 3 years ago

Note changing just this probably isn't sufficient since other tools may e.g. use TAP::Harness; such as zef and should be updated

thundergnat commented 3 years ago

Hmm. good point. Probably should change the entry point to TAP::Harness since that is how the module is referred to in the README, or maybe cut down the provides section to TAP and TAP::Harness. Two recompiles is still a lot better than twenty-six.

Leont commented 3 years ago

Drastically slows down compilation as it recompiles the library for every mention of it in the provides section. It only needs to compile it once.

I had no idea about that, that does seem unfortunate (and unnecessary?)

I am sympathetic to this change, if only because mi6 doesn't support the current paradigm (it wants to overwrite it to what you're suggesting here) and that makes releasing the module a hassle. We would first have to deal with the ecosystem fallout though.

Leont commented 2 years ago

Note changing just this probably isn't sufficient since other tools may e.g. use TAP::Harness; such as zef and should be updated

prove6 and mi6 use TAP, so if we just change zef we can remove TAP::Harness (and obviously all the other entries). I don't think anything else uses this (though I might be mistaken).

Leont commented 2 years ago

Note changing just this probably isn't sufficient since other tools may e.g. use TAP::Harness; such as zef and should be updated

prove6 and mi6 use TAP, so if we just change zef we can remove TAP::Harness (and obviously all the other entries). I don't think anything else uses this (though I might be mistaken).

It turns out zef's logic didn't work in the first place, so this is no longer a blocker.

ugexe commented 2 years ago

It turns out zef's logic didn't work in the first place, so this is no longer a blocker.

It worked at one time, although I don't how long ago that actually was (presumably whenever the following still worked):

$ raku -e 'require TAP::Harness;'
P6M Merging GLOBAL symbols failed: duplicate definition of symbol Version
  in block <unit> at -e line 1
ugexe commented 2 years ago
➜  tap-harness6 git:(master) rakubrew switch moar-2019.03.1
Switching to moar-2019.03.1
➜  tap-harness6 git:(master) perl6 -I. -e 'require TAP::Harness;'

➜  tap-harness6 git:(master) rakubrew switch moar-2019.07.1
Switching to moar-2019.07.1
➜  tap-harness6 git:(master) perl6 -I. -e 'require TAP::Harness;'
P6M Merging GLOBAL symbols failed: duplicate definition of symbol Version
  in block <unit> at -e line 1
Leont commented 2 years ago

It turns out zef's logic didn't work in the first place, so this is no longer a blocker.

It worked at one time, although I don't how long ago that actually was (presumably whenever the following still worked):

$ raku -e 'require TAP::Harness;'
P6M Merging GLOBAL symbols failed: duplicate definition of symbol Version
  in block <unit> at -e line 1

That sounds like a rakudo bug to me. If use and need work, require should also work. require ::('TAP') also works fine, so I guess it is an issue with the placeholder package.

ETA: reported as https://github.com/rakudo/rakudo/issues/4488