plone / plone.recipe.codeanalysis

provides static code analysis for Buildout-based Python projects, including flake8, JSHint, CSS Lint, and other code checks
https://pypi.org/project/plone.recipe.codeanalysis/
11 stars 8 forks source link

Support multi-processing on python3.8 #230

Closed janjaapdriessen closed 3 years ago

janjaapdriessen commented 3 years ago

@tisto I closed the previous PR to please the "Plone Contributors Agreement verifier". I down-pinned flake8 to a version that doesn't pull in the zipp dependency. Travis is now green on python2.7 and python3.6+.

tisto commented 3 years ago

@janjaapdriessen thanks for your contribution!

When trying to do a release I did a buildout run and ran into a problem with rubygems:

Installing rubygems.
Downloading https://rubygems.org/rubygems/rubygems-3.1.4.zip
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ apply2files - /Library/Ruby/Gems/2.6.0/specifications/default/bundler-1.17.2.gemspec
rubygems:
rubygems: Command failed with exit code 1: [u'ruby', u'setup.rb', u'all', u'--prefix=/Users/timo/workspace/plone/plone.recipe.codeanalysis/parts/rubygems', u'--no-rdoc', u'--no-ri']
While:
  Installing rubygems.
Error: System error
make: *** [.installed.cfg] Error 1

I really dislike installing tools via buildout. Maybe it is time to remove those checks from p.r.codeanalysis. Those kind of checks belongs to the frontend part. Everything we do in Plone with JS is horribly outdated...

janjaapdriessen commented 3 years ago

@tisto I feel your pain. Shall I make a PR to eradicate scsslint and all it's ruby dependencies altogether?

tisto commented 3 years ago

@janjaapdriessen I'd say so. p.r.codeanlysis should restrict itself to Python checks. The longer we try to maintain those deps, the more pain we will see. Mixing Python and JS was never a good idea (my fault) and we should stop putting more effort into a fight that we are going to lose anyway.

@gyst would you be ok with that move?

gyst commented 3 years ago

Note that the rubygems problem is a regression caused by changing this line: buildout -N -t 3 -c $CONF || buildout -N -t 3 -c $CONF into a single buildout invocation. That hack was there for specifically this reason. I did not comment on its removal since Travis appeared to be ok with it.

I don't see the rationale for checking "only python". That would imply removing most of the checkers, including zpt, chameleon, i18n and all the javascript checkers. One might as well ditch plone.recipe.codeanalysis and use black or whatever directly.

tisto commented 3 years ago

@gyst with "python only" I meant everything except JS checkers, which, as said, I believe belong to the frontend stack (whatever that might be).

janjaapdriessen commented 3 years ago

Can we continue this discussion in https://github.com/plone/plone.recipe.codeanalysis/pull/231 please?