sqitchers / homebrew-sqitch

Homebrew Formulas for Sqitch
22 stars 10 forks source link

Error on OSX 14.0 #61

Open BenoitOClock opened 10 months ago

BenoitOClock commented 10 months ago

Hey,

I'm working with Sqitch almost daily, but it suddenly stopped working. I tried reinstalling Perl, Sqitch, I have even uninstalled and reinstalled homebrew but i keep facing the same error, whatever sqitch command i try to execute

I'm on a 2019 intel MBP running Sonoma 14.0

Array found where operator expected (Do you need to predeclare "say"?) at /usr/local/Cellar/sqitch/1.4.0/libexec/../lib/perl5/App/Sqitch.pm line 566, near "say @_"
syntax error at /usr/local/Cellar/sqitch/1.4.0/libexec/../lib/perl5/App/Sqitch.pm line 566, near "say @_"
Execution of /usr/local/Cellar/sqitch/1.4.0/libexec/../lib/perl5/App/Sqitch.pm aborted due to compilation errors.
Compilation failed in require at /usr/local/Cellar/sqitch/1.4.0/libexec/sqitch line 15.
BEGIN failed--compilation aborted at /usr/local/Cellar/sqitch/1.4.0/libexec/sqitch line 15.

How can i fix that please ?

BenoitOClock commented 10 months ago

I finally solved the issue by adding use feature qw(say); to /usr/local/Cellar/sqitch/1.4.0/lib/perl5/App/Sqitch.pm

theory commented 10 months ago

I don't understand this issue, because this line enables say. What version of Perl are you using? The first line of /opt/homebrew/bin/sqitch should tell you, and if the path doesn't include a version, copy the path to the terminal and add --version.

I'm using 5.38.0, which is the latest, and do not have this issue. Very strange.

BenoitOClock commented 10 months ago

I’m on the same perl version as you are. On my side bug is reproductible. To tell you the truth before finding the fix, i tried installing a fresh sonoma on an external drive with homebrew only, to be sure it was not some conflict with another piece of software… and even then, the bug was present.

theory commented 10 months ago

This is the Homebrew-installed Perl?

BenoitOClock commented 10 months ago

Yes it is

theory commented 8 months ago

Finally getting back to this. Just upgraded Homebrew Perl to 5.38.2 and reinstalled Sqitch v1.4.0. I do not get the error:

❯ /opt/homebrew/bin/sqitch --version
sqitch (App::Sqitch) v1.4.0

The --version option causes Sqitch to call emit here, and emit uses say at line 566.

I don't understand what could be causing this. What does the sqitch command look like? Run:

cat /opt/homebrew/bin/sqitch
Ovid commented 8 months ago

Also, directly under use feature 'say';, I'd add this say "Perl version is '$^V'";

Even if you think you're running the correct version of Perl, it's possible that something under the hood is dispatching to a version you're not expecting.