These are chat archives for coala/coala-bears

31st
Aug 2016
AbdealiJK
@AbdealiJK
Aug 31 2016 15:34
Review up - coala-analyzer/coala-bears#747
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 15:38
gave you a review ^^
AbdealiJK
@AbdealiJK
Aug 31 2016 16:15
@Adrianzatreanu Thanks :)
updated it now
AbdealiJK
@AbdealiJK
Aug 31 2016 17:31
@sils1297 How did you get the ESLint relative import error ?
Can you give me a example ? I seem to keep getting "require" not defined or other issues when I make an example
Lasse Schuirmann
@sils
Aug 31 2016 17:31
@AbdealiJK can't give you my example because of NDA
@underyx might be able to construct one
AbdealiJK
@AbdealiJK
Aug 31 2016 17:33
You can give me a dummy equivalent
I'm just trying:
var addOne = require('./eslint_test_module');

addOne(2);
Lasse Schuirmann
@sils
Aug 31 2016 17:34
it was an import ./../../../something
(es6)
AbdealiJK
@AbdealiJK
Aug 31 2016 17:34
import addOne from './eslint_test_module';
?
Lasse Schuirmann
@sils
Aug 31 2016 17:35
should reproduce it as well
AbdealiJK
@AbdealiJK
Aug 31 2016 17:36
And what flags ? es_version = 6 ?
Lasse Schuirmann
@sils
Aug 31 2016 17:36
yep
import is es6 specific AFAIK
AbdealiJK
@AbdealiJK
Aug 31 2016 17:38
So, this gives me the error "Parsing error: The keyword 'import' is reserved"
AbdealiJK @AbdealiJK doesn't know high level JS very well
AbdealiJK
@AbdealiJK
Aug 31 2016 17:41
Was the code you ran this on Web JS or NodeJS ?
Pinging on the issue
Lasse Schuirmann
@sils
Aug 31 2016 17:59
node
@underyx can't construct an example as well :P
AbdealiJK
@AbdealiJK
Aug 31 2016 18:10
@sils1297 I need you again to provide info for your issues
You really need to put more info in your issues. I don't think anyone can understand them :|
coala-analyzer/coala-bears#727 - How did you get an error ? What error ?
AbdealiJK
@AbdealiJK
Aug 31 2016 18:19
@sils1297 ?
Lasse Schuirmann
@sils
Aug 31 2016 18:25
@AbdealiJK you're right :/
AbdealiJK
@AbdealiJK
Aug 31 2016 18:25
So, see
The ESLintBear is giving the output of --help only for "" (Which is surprisingly frequent in the tests)
It seems ESLint doesn't know how to parse "", but knows how to parse "\n"
Note that the "" part, even though it throws an error, all results in that are ignored by an if condition which hides it from us.
So, I'm wondering what error you saw to create that issue ... because there is no scenario I can see you getting an error there
Lasse Schuirmann
@sils
Aug 31 2016 18:27
Sounds pretty evil even on phone
AbdealiJK
@AbdealiJK
Aug 31 2016 18:27
ESLint does not break down if the file has no issues
Lasse Schuirmann
@sils
Aug 31 2016 18:27
Then we'll have to close this issue because I don't know anymore :/
But we'll definitely have some more crash testing tomorrow if E can make a bugfix release today
AbdealiJK
@AbdealiJK
Aug 31 2016 18:29
Sounds good. Although a bugfix release may be difficult in a day ... (Ive only solved 2 bugs)
underyx has done some too, 2 more I think
Lasse Schuirmann
@sils
Aug 31 2016 18:30
Why not it's simple & easy & fixes bugs
AbdealiJK
@AbdealiJK
Aug 31 2016 18:31
alright
Lasse Schuirmann
@sils
Aug 31 2016 18:31
I'll do it tomorrow morning if I can use it for work
Then we are trigger the docker build and are happy until the end of this release
AbdealiJK
@AbdealiJK
Aug 31 2016 18:32
:+1:
Lasse Schuirmann
@sils
Aug 31 2016 18:33
I'll also do at least one review when I'm home today
I just need a reviewer and the bugfixes for the release.
AbdealiJK
@AbdealiJK
Aug 31 2016 18:34
When will you get home ? In how many hrs ?
Lasse Schuirmann
@sils
Aug 31 2016 18:34
.1
AbdealiJK
@AbdealiJK
Aug 31 2016 18:35
:|
Bence Nagy
@underyx
Aug 31 2016 18:40
can I get this merged maybe? coala-analyzer/coala-bears#748
@AbdealiJK your ack didn't seem to successfully flip the manual review flag :/
AbdealiJK
@AbdealiJK
Aug 31 2016 18:40
Was trying that. gitmate was misbehaving
Bence Nagy
@underyx
Aug 31 2016 18:41
ah, alrighty then!
thanks :cat:
AbdealiJK
@AbdealiJK
Aug 31 2016 18:44
@underyx Do you have any idea what JSComplexityBear uses ?
It says "cr" but that's literally unsearchable.
Lasse Schuirmann
@sils
Aug 31 2016 18:51
yep and that doesn't support es6 which means we can't use it I think but complexity is one of the main things we want :(
btw. I'm home since almost .1 hours
AbdealiJK
@AbdealiJK
Aug 31 2016 18:53
alright rolls eyes
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:09
guys :fearful: :scream: coala is not running
[ERROR][20:07:56] There is a conflict in the version of a dependency you have installed and the requirements of coala. This may be resolved by creating a separate virtual environment for coala or running `pip install yapf==0.10`. Be aware that the latter solution might break other python packages that depend on the currently installed version.
AbdealiJK
@AbdealiJK
Aug 31 2016 19:10
Your yapf version is clashing
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:10
huh
Lasse Schuirmann
@sils
Aug 31 2016 19:10
@underyx didn't you say this was resolved?
AbdealiJK
@AbdealiJK
Aug 31 2016 19:11
Do a pip install -r requirements.txt. I think underyx recently pushed a PR where the yapf version needed was 0.11 or something
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:11
yep
Bence Nagy
@underyx
Aug 31 2016 19:11
indeed
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:12
@AbdealiJK that is what i did, when it started
AbdealiJK
@AbdealiJK
Aug 31 2016 19:12
pip install -r requirements -U ?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:17
not working
:(
AbdealiJK
@AbdealiJK
Aug 31 2016 19:18
Ok, what version of yapf do you have installed ? Try uninstalling it and reinstalling ?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:19
i did that too :( (i have yapf 0.11.1)
AbdealiJK
@AbdealiJK
Aug 31 2016 19:20
Are you sure your coala is updated then ?
Do you normally use pip install . or pip install -e . or python setup.py develop or .. ?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:21
i just ipdated it
AbdealiJK
@AbdealiJK
Aug 31 2016 19:21
Then I haves no clue !
Lasse Schuirmann
@sils
Aug 31 2016 19:22
:s
Adhityaa
@adtac
Aug 31 2016 19:22
@Asnelchristian venv? no idea what your problem is, but venv always solved all my dependency issues
*try a venv is what I meant
AbdealiJK
@AbdealiJK
Aug 31 2016 19:23
I assumed he was already using one
Adhityaa
@adtac
Aug 31 2016 19:23
then a fresh venv :P
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:25
i will try :)
Bence Nagy
@underyx
Aug 31 2016 19:27
@Asnelchristian I've just tried launching a clean docker container with just python and pip in it, and after pip install cib && cib install YapfBear coala worked for me
then I started a new container and in that one I ran pip install --pre coala-bears, and coala worked there as well
so the issue must be something on your end
Adhityaa
@adtac
Aug 31 2016 19:28
@underyx or we could have an issue with coala when some older user tries out cib
older user as in someone who already has bears installed
Bence Nagy
@underyx
Aug 31 2016 19:28
@Asnelchristian you weren't using cib, right?
I thought you just git pulled and pip installed reqs
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:32
@underyx i was using cib
Bence Nagy
@underyx
Aug 31 2016 19:32
oh
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:32
just found something
it seems yapfBear package is not up-to-date
AbdealiJK
@AbdealiJK
Aug 31 2016 19:33
CC @Adrianzatreanu :D
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:36
it is now working
but we must admit there is a problem with requirements.txt
i also had this
[ERROR][20:34:09] There is a conflict in the version of a dependency you have installed and the requirements of coala. This may be resolved by creating a separate virtual environment for coala or running `pip install nltk==3.1.*`. Be aware that the latter solution might break other python packages that depend on the currently installed version.
AbdealiJK
@AbdealiJK
Aug 31 2016 19:38
@sils1297 coala-analyzer/coala-bears#730 is a little hard fo me to reproduce I seem to be getting "UNMET PEER DEPENDENCY" when installing eslint and the react plugin together
Again, due to lack of knowledge of NPM I'm pausing that for now ...
Lasse Schuirmann
@sils
Aug 31 2016 19:38
alright
assign me and needinfo with anything you need or so?
AbdealiJK
@AbdealiJK
Aug 31 2016 19:39
I'm not very sure what I need. Maybe it's an issue with my system ?
Bence Nagy
@underyx
Aug 31 2016 19:53
@sils1297 maybe you can reopen and fix coala-analyzer/coala-bears#728 since we have the repro now?
AbdealiJK
@AbdealiJK
Aug 31 2016 19:54
I'm sorry ... how do I reproduce it ?
Lasse Schuirmann
@sils
Aug 31 2016 19:55
yeah didn' get that either
Bence Nagy
@underyx
Aug 31 2016 19:55

exactly as you said @sils1297

by providing a good file without errors I think

AbdealiJK
@AbdealiJK
Aug 31 2016 19:56
The way I tested it is:
  • Run pytest -k ESLintBear -s -x which tells pytest to show all the outputs printed to stdout
  • I printed output, file, etc. inside the bear before the json parsing and it says it gives the json I had posted on the issue
@underyx So, Can you try running the tests using pytest ?
Bence Nagy
@underyx
Aug 31 2016 19:56
right, I was using eslint directly
AbdealiJK
@AbdealiJK
Aug 31 2016 19:57
Because there are a few tests that check that no result has been given by the bear
Ah. with what command line arguments ?
Bence Nagy
@underyx
Aug 31 2016 19:57
none
eslint .
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 19:57
@sils1297 maybe we should go ahead and merge the PHPCodeSnifferBear stuff, i am adding configs latter
AbdealiJK
@AbdealiJK
Aug 31 2016 19:57
Can you try with --no-ignore --no-color -f=json ?
Bence Nagy
@underyx
Aug 31 2016 19:58
oh…
AbdealiJK
@AbdealiJK
Aug 31 2016 19:58
^ The bear uses those arguemnts
Bence Nagy
@underyx
Aug 31 2016 19:58
I should've read the code, sorry :sweat_smile:
I did get output now
AbdealiJK
@AbdealiJK
Aug 31 2016 19:58
:+1: is it json output ?
Lasse Schuirmann
@sils
Aug 31 2016 19:59
@underyx coala also outputs the command as debug message
@Asnelchristian you think the configs are hard? Usually rather simple.
@AbdealiJK in general I think we might want to have the linter decorator adjust the CWD to the file's directory if we don't do that already... I think we actually might
AbdealiJK
@AbdealiJK
Aug 31 2016 20:02
Nope
Our CWD is cwd=self.get_config_dir()
i.e. the project root
Lasse Schuirmann
@sils
Aug 31 2016 20:05
ah! Urgh so we need to decide wether to use the config dir or the file dir
AbdealiJK
@AbdealiJK
Aug 31 2016 20:06
Nod. I think the fact that we have this as cwd => it was needed at some point. Should dig through history
Lasse Schuirmann
@sils
Aug 31 2016 20:06
well for absolute imports you'll want config dir
for relative imports you'll want file dir
AbdealiJK
@AbdealiJK
Aug 31 2016 20:07
Ah, you meant only for ESLint ?
Lasse Schuirmann
@sils
Aug 31 2016 20:07
it might as well be useful for some others
AbdealiJK
@AbdealiJK
Aug 31 2016 20:07
I'm not sure. I'd suggest you speak to some JS devs and ask them which one is possible ?
Maybe we add a config for it ? How does eslint figure it out ?
Lasse Schuirmann
@sils
Aug 31 2016 20:08
yes maybe oreqizer is on coala channel
but he said for JS relative imports are kind of the default
so we'll want the file directory
AbdealiJK
@AbdealiJK
Aug 31 2016 20:09
I do remember reading that some type of JS module (ASM module ?) Cannot do relative imports
In ES6 the norm is relative import though (says a SO post Im reading)
AbdealiJK
@AbdealiJK
Aug 31 2016 20:30
CircleCI frequently quits with errors of timeout and so on in coala-bears ...
Lasse Schuirmann
@sils
Aug 31 2016 20:30
yep I think we can cache some thing, there are issues filed already
AbdealiJK
@AbdealiJK
Aug 31 2016 20:31
:+1:
Lasse Schuirmann
@sils
Aug 31 2016 20:31
and I already cached checkstyle because it was even worse before
it's usually downloads from sourceforge that fail
AbdealiJK
@AbdealiJK
Aug 31 2016 20:32
I think my branch still doesn't use the cached one
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:32
@sils1297 it is easily doable, i am just not stable these days
  • i am quite busy at home (mum's revenge )
Lasse Schuirmann
@sils
Aug 31 2016 20:32
heh
:)
Lasse Schuirmann
@sils
Aug 31 2016 20:38
@Asnelchristian is there anything else pending on that one?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:40
adding configs
AbdealiJK
@AbdealiJK
Aug 31 2016 20:40
:P
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 20:41
Hm?
Im confused, whats the problem with an not updated package?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:42
pip install yapfbear
installs yapf==0.10.*
Lasse Schuirmann
@sils
Aug 31 2016 20:43
huh it shouldn't. Like definintely not
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:43
yeah. that is what i meant @Adrianzatreanu
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 20:44
Try with --upgr
Upgrade?
Lasse Schuirmann
@sils
Aug 31 2016 20:45
with cib right?
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 20:45
Yes
Cib upgrade YapfBear
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:46
:+1:
it is okay
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 20:47
It works?
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:50
yes
@Adrianzatreanu i have a question
i accidentally uninstalled yapf
and i ran cib install YapfBear after that
YapfBear is already installed.  SKIP!
Traceback (most recent call last):
  File "/home/asnel_ulrich/anaconda3/bin/cib", line 11, in <module>
    sys.exit(main())
  File "/home/asnel_ulrich/anaconda3/lib/python3.5/site-packages/coala_package_manager/installation_tool.py", line 224, in main
    args['--ignore-deps'])
  File "/home/asnel_ulrich/anaconda3/lib/python3.5/site-packages/coala_package_manager/installation_tool.py", line 179, in install_bears
    bears_failed_list += install_requirements(bear_name)
  File "/home/asnel_ulrich/anaconda3/lib/python3.5/site-packages/coala_package_manager/installation_tool.py", line 102, in install_requirements
    'coala' + package_name + '.' + package_name)
  File "/home/asnel_ulrich/anaconda3/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/asnel_ulrich/anaconda3/lib/python3.5/site-packages/coalaYapfBear/YapfBear.py", line 3, in <module>
    from yapf.yapflib.yapf_api import FormatFile
ImportError: No module named 'yapf'
that is the error log
is that normal?
AbdealiJK
@AbdealiJK
Aug 31 2016 20:54
ah. this is a known issue
Essentially Pip packages are not handled well by cib right now
Because for CIB to understand the dependencies it needs to run the bear's python file - which imports the pip dependencies on top
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 20:56
ah okay
i thought the problem was solved
AbdealiJK
@AbdealiJK
Aug 31 2016 20:56
oh. I may not be updated about whether it was solved or not.
@sils1297 can you update coala-analyzer/coala-bears#750 ?
So, I can close that ? ^
Lasse Schuirmann
@sils
Aug 31 2016 21:03
ahm not fully sure we might want to handle that
instead of erroring out showing "you've got a syntax problem there"
it's not necessarily urgent though
AbdealiJK
@AbdealiJK
Aug 31 2016 21:06
What other bears are you using right now ? JSHint, ESLint, then ?
Lasse Schuirmann
@sils
Aug 31 2016 21:07
JSComplexity doesn't work for ES6 but we want complexity measurement sooner or later definitely
Yapf for python, I'll set up Radon
AbdealiJK
@AbdealiJK
Aug 31 2016 21:08
I fixed JSComplexity too
Lasse Schuirmann
@sils
Aug 31 2016 21:08
in general python, js stuff primarily
AbdealiJK
@AbdealiJK
Aug 31 2016 21:08
alright
Lasse Schuirmann
@sils
Aug 31 2016 21:08
but JSComplexity doesn't work for ES6 at all right?
Bence Nagy
@underyx
Aug 31 2016 21:08
if you use YapfBear, you can't use Flake8Bear because the two give conflicting patches, right, @sils1297?
Lasse Schuirmann
@sils
Aug 31 2016 21:08
yep
Bence Nagy
@underyx
Aug 31 2016 21:08
uh-oh
AbdealiJK
@AbdealiJK
Aug 31 2016 21:08
But you can run them in different sections
Bence Nagy
@underyx
Aug 31 2016 21:09
and if you have something they disagree on, coala-ci would always fail on one section or the other, no?
Lasse Schuirmann
@sils
Aug 31 2016 21:09
yep
you can turn off that class of errors though
Bence Nagy
@underyx
Aug 31 2016 21:10
anyway my main issue is that if someone uses YapfBear, they can't have python syntax checking if I'm not wrong :/
AbdealiJK
@AbdealiJK
Aug 31 2016 21:10
@underyx But if you have something they disagree on implies one of your settings contradicts the other
Lasse Schuirmann
@sils
Aug 31 2016 21:10
if you configure them right
Christian Asnel Ngoulla Sob
@AsnelChristian
Aug 31 2016 21:10
coala-analyzer/coala-bears#750 seems to be a problem with yapf
Bence Nagy
@underyx
Aug 31 2016 21:11
maybe there should be a PythonSyntaxBear that only complains about invalid syntax?
perhaps using the builtin ast
AbdealiJK
@AbdealiJK
Aug 31 2016 21:11
^ That would be nice indeed
Bence Nagy
@underyx
Aug 31 2016 21:11
alright, creating an issue
AbdealiJK
@AbdealiJK
Aug 31 2016 21:11
But it's limited to the python version you install it in I guess
(I don't know if these are any different)
AbdealiJK
@AbdealiJK
Aug 31 2016 21:19
astroid is the base of pylint from what i remember
Bence Nagy
@underyx
Aug 31 2016 21:19
yep
Zatreanu Adrian-Gabriel
@Adrianzatreanu
Aug 31 2016 23:25
@Asnelchristian yes, its known, and i have absolutely no idea how to fix it for now (instead of parsing the file as txt), if you uninstall dependencies and have bear installed..its not good :D