Skip to content
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

CPDBear failing on Windows, both AppVeyor and Travis Windows #2937

Closed
jayvdb opened this issue Jul 24, 2019 · 4 comments
Closed

CPDBear failing on Windows, both AppVeyor and Travis Windows #2937

jayvdb opened this issue Jul 24, 2019 · 4 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Jul 24, 2019

Builds are consistently failing with four errors like

____________________ CPDBearTest.test_unsupported_language ____________________
Forbidden skipped test - Skipped: PMD is missing. Make sure to install it from <https://pmd.github.io/>.

https://ci.appveyor.com/project/coala/coala-bears/build/job/tqv9oos3f43wspkt and https://travis-ci.org/coala/coala-bears/jobs/562576591

Almost certainly an error in the final phase of #2910 , when I was culling unneeded stuff, which was masked by the caching.

@jayvdb
Copy link
Member Author

jayvdb commented Jul 24, 2019

Specifically it was caused by #2910 (comment) - the 'bash' was used to run .ci/deps.coala-bears.sh

jayvdb added a commit to jayvdb/coala-bears that referenced this issue Jul 24, 2019
Running of .ci/deps.coala-bears.sh was removed from tox.ini
during the cleanup of coala#2910
but was necessary and the problem masked by the CI cache.

Fixes coala#2937
@jayvdb
Copy link
Member Author

jayvdb commented Jul 24, 2019

jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 3, 2019
Running of .ci/deps.coala-bears.sh was removed from tox.ini
during the cleanup of coala#2910
but was necessary and the problem masked by the CI cache.

Fixes coala#2937
@jayvdb
Copy link
Member Author

jayvdb commented Aug 3, 2019

When logging memory addresses of the linter class (c.f. coala/coala#6051), we see that the class of the linter object doing the download (and setting checkstyle_jar_file) has a different id to the class of the linter object which expects the attribute checkstyle_jar_file to exist.

[13:58:53] downloading as <CheckstyleBear linter object (wrapping 'java') at 0x3849530> of class at '0x37a8d18'
[DEBUG]
[13:58:53] Running bear CheckstyleBear...
[DEBUG]
[13:58:53] running as <CheckstyleBear linter object (wrapping 'java') at 0x3640f10> of class at '0x370d790'

@jayvdb
Copy link
Member Author

jayvdb commented Aug 3, 2019

Re CPDBear, the two alternatives at the moment are #1663 or #2908 .

However, these bears were not previously being tests on Windows (c.f. git show cbe1841 .ci/appveyor.yml), and a rule was added to .ci/get_tests.py to exclude them for the java selector.

jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 3, 2019
Describe current executable requirements of pmd or run.sh.

Related to coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 3, 2019
Describe current executable requirements of pmd or run.sh.

Fixes coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 3, 2019
Also update generate_bear_metadata.py to avoid including paths
from python3 dependencies, and sync with package_manager adding
new distribution class 'pkg'.

Fixes coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 4, 2019
Describe current executable requirements of pmd or run.sh.

Related to coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 4, 2019
Describe current executable requirements of pmd or run.sh.

Also remove explicit invocation using `bash`, which was
ineffective as which('run.sh') would only be successful
if the script was executable.

Fixes coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 4, 2019
Also update generate_bear_metadata.py to avoid including paths
from python3 dependencies, and sync with package_manager adding
new distribution class 'pkg'.

Fixes coala#2937
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 5, 2019
Describe current executable requirements of cpd or run.sh,
replacing check_prerequisites with Requirement classes.

Also remove explicit invocation using `bash`, which was
ineffective as which('run.sh') would only be successful
if the script was executable, and the run.sh script is not
written to be compatible with invocation on Windows.

This de-supports any usage where `pmd` existed and was a script
which could invoke `cpd`.  It fixes usage where `pmd` is not a
script, like it is an executable shim when installed with choco.

Also remove duplication of `CPDBear` in generate_bear_metadata.py
which was intended to make 'cpd' deselectable, but was broken.
It is now mostly unnecessary as the ExecutableRequirement classes
provide the `cpd` tag, however the `java` tag is still manual.

Fixes coala#2937
Related to coala#2908
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 5, 2019
Describe current executable requirements of cpd or run.sh,
replacing check_prerequisites with Requirement classes.

Also remove explicit invocation using `bash`, which was
ineffective as which('run.sh') would only be successful
if the script was executable, and the run.sh script is not
written to be compatible with invocation on Windows.

This de-supports any usage where `pmd` existed and was a script
which could invoke `cpd`.  It fixes usage where `pmd` is not a
script, like it is an executable shim when installed with choco.

Also remove duplication of `CPDBear` in generate_bear_metadata.py
which was intended to make 'cpd' deselectable, but was broken.
It is now mostly unnecessary as the ExecutableRequirement classes
provide the `cpd` tag, however the `java` tag is still manual.

Fixes coala#2937
Related to coala#2908
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 5, 2019
Describe current executable requirements of cpd or run.sh,
replacing check_prerequisites with Requirement classes.

Also remove explicit invocation using `bash`, which was
ineffective as which('run.sh') would only be successful
if the script was executable, and the run.sh script is not
written to be compatible with invocation on Windows.

This de-supports any usage where `pmd` existed and was a script
which could invoke `cpd`.  It fixes usage where `pmd` is not a
script, like it is an executable shim when installed with choco.

Also remove duplication of `CPDBear` in generate_bear_metadata.py
which was intended to make 'cpd' deselectable, but was broken.
It is now mostly unnecessary as the ExecutableRequirement classes
provide the `cpd` tag, however the `java` tag is still manual.

Reduce the required coverage percentage to 98%.

Fixes coala#2937
Related to coala#2908
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Aug 6, 2019
Describe current executable requirements of cpd or run.sh,
replacing check_prerequisites with Requirement classes.

Also remove explicit invocation using `bash`, which was
ineffective as which('run.sh') would only be successful
if the script was executable, and the run.sh script is not
written to be compatible with invocation on Windows.

This de-supports any usage where `pmd` existed and was a script
which could invoke `cpd`.  It fixes usage where `pmd` is not a
script, like it is an executable shim when installed with choco.

Also remove duplication of `CPDBear` in generate_bear_metadata.py
which was intended to make 'cpd' deselectable, but was broken.
It is now mostly unnecessary as the ExecutableRequirement classes
provide the `cpd` tag, however the `java` tag is still manual.

Reduce the required coverage percentage to 98%.

Fixes coala#2937
Related to coala#2908
@jayvdb jayvdb closed this as completed in a0f5a9e Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant