New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PERL_USE_UNSAFE_INC from Perl Environment #8822

Closed
szabgab opened this Issue Nov 29, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@szabgab

szabgab commented Nov 29, 2017

The environment variable PERL_USE_UNSAFE_INC=1 adds "." back to @INC in Perl 5.26. This makes the Travis-CI environment less realistic than it could be. In a nutshell: There will be code that works on Travis and fails in a standard installation of Perl 5.26.

I've written a bit more about this here: https://perlmaven.com/removal-of-the-current-directory-from-inc-and-travis

IMHO PERL_USE_UNSAFE_INC should not be set by Travis.

@BanzaiMan BanzaiMan added the perl label Nov 29, 2017

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Nov 29, 2017

Member

How did you determine that this environment variable is set? I ran a quick test; I found no evidence and that @INC does not contain ., either.

Member

BanzaiMan commented Nov 29, 2017

How did you determine that this environment variable is set? I ran a quick test; I found no evidence and that @INC does not contain ., either.

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Nov 29, 2017

Member

5.24 build does include . (https://travis-ci.org/BanzaiMan/travis_production_test/jobs/309238158#L451), which is expected, according to your account.

Member

BanzaiMan commented Nov 29, 2017

5.24 build does include . (https://travis-ci.org/BanzaiMan/travis_production_test/jobs/309238158#L451), which is expected, according to your account.

@szabgab

This comment has been minimized.

Show comment
Hide comment
@szabgab

szabgab Nov 30, 2017

Thanks for checking it. I've just checked again myself. Apparently what turns on that environment variable is "make test" and not Travis.

It took me a while to understand how the ENV setting in .travis.yml could override this, but apparently "make test" or more specifically Test::Harness will only set this ENV var if it does not exist.

https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/62688b0c26fedf4760e809ef90186c47d2307b96/lib/Test/Harness.pm#L150

So it is not something Travis can or should fix. Sorry for the false issue.

szabgab commented Nov 30, 2017

Thanks for checking it. I've just checked again myself. Apparently what turns on that environment variable is "make test" and not Travis.

It took me a while to understand how the ENV setting in .travis.yml could override this, but apparently "make test" or more specifically Test::Harness will only set this ENV var if it does not exist.

https://github.com/Perl-Toolchain-Gang/Test-Harness/blob/62688b0c26fedf4760e809ef90186c47d2307b96/lib/Test/Harness.pm#L150

So it is not something Travis can or should fix. Sorry for the false issue.

@szabgab szabgab closed this Nov 30, 2017

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Nov 30, 2017

Member

@szabgab Thanks for the confirmation. I also suggest appending an addendum to your incorrect blog post or deleting it.

Member

BanzaiMan commented Nov 30, 2017

@szabgab Thanks for the confirmation. I also suggest appending an addendum to your incorrect blog post or deleting it.

@szabgab

This comment has been minimized.

Show comment
Hide comment
@szabgab

szabgab Nov 30, 2017

Yes, I've already updated it including an apology to Travis.

szabgab commented Nov 30, 2017

Yes, I've already updated it including an apology to Travis.

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Nov 30, 2017

Member

Super. Thanks.

Member

BanzaiMan commented Nov 30, 2017

Super. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment