Closed xiota closed 7 months ago
A major improvement π
CI is failing because of shellcheck
, but when I run it locally, it doesn't complain about anything.
The logs state that prettier isn't happy π€
Prettier is not happy because it doesn't have files to process?
$ prettier . && shellcheck *
[error] No supported files were found in the directory: ".".
$ if prettier . ; then echo true ; else echo false ; fi
[error] No supported files were found in the directory: ".".
false
$ if shellcheck * ; then echo true ; else echo false ; fi
true
I think you might be missing the shell plugin, iirc Arch had several packages for this purpose.
https://www.npmjs.com/package/prettier-plugin-sh
https://github.com/chaotic-aur/toolbox/blob/main/package.json#L5
For reference see the #lint section of the toolboxes' README π
Still can't find what's wrong.
$ yarn run lint
yarn run v1.22.19
$ prettier --check . && shellcheck src/*.sh src/lib/*.sh guest/bin/* slurm-jobs/*/*.sh
Checking formatting...
All matched files use Prettier code style!
Done in 3.28s.
I will be taking a look as soon as possible.
Got it... yarn prettify
took care of it.
This doesn't work with split packages. Did the original?
This doesn't work with split packages. Did the original?
Afaik it did not, and pkgbase also did not :eyes:
This doesn't work with split packages. Did the original?
Afaik it did not, and pkgbase also did not π
Will think about how/if-possible to add it. Would be easier if some way to track them.
More verbose, but 21-25x speed-up.
Test scripts: bump_old.sh, bump_new.sh
Performance note: Original function was O(n^2) because it has nested n-loops. Revised function is O(n log n) because of use of
sort
. If not for sort, it would be O(n) because the outer loops are over small lists, O(1). Expected performance should be close to O(n) because package lists should be already sorted. It looks more inefficient because of repeated O(1) and O(n) blocks. But they combine to O(n).Behavior change. Instead of printing entire PKGREL_BUMPS file, prints only bumped packages that haven't been rebuilt yet (without version info) because they are probably broken. Current output: