These are chat archives for coala/coala-bears

13th
Jun 2016
Fabian Neuschmidt
@fneu
Jun 13 2016 10:55

hey guys,

so I'm in the process of creating a docker image for coala right now, containing all the stuff necessary to run everything we can offer. I'm not done and bear stuff breaks. One thing I notice is that it is rather easy to figure out missing or broken dependencies from running the tests pulled from github. But those don't come with coala by default so I'm afraid we are offering a really bad user experience for others.

Say I'm a user looking to check R stuff. I install coala and coala-bears (and in this case also some R related stuff I found in .ci/deps.shon GitHub)

I'm now checking for bears I can use on my R files, first result is:

59c91643698e:/coala-bears # coala -l R
FormatRBear:
  This bear checks and corrects formatting of R Code using known formatR utility.

  Supported languages:
   * R

  Used in:
   * linecounting
   * python
   * autopep8
   * todos
   * commit
   * default
   * linelength

  No needed settings.

  No optional settings.

So now I'm happy and want to use that bear

59c91643698e:/coala-bears # coala -b FormatRBear
Executing section Default...
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
[WARNING][10:49:43] Bear FormatRBear failed to run. Take a look at debug messages for further information.
...

well I looked at the test and not debug message but still:

E           AssertionError: Bear returned None on execution
E            
E           Running bear FormatRBear...
E           Bear FormatRBear failed to run. Take a look at debug messages for further information.
E           The bear FormatRBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.
E           
E           Traceback information is provided below:
E           
E           Traceback (most recent call last):
E             File "/usr/lib/python3.5/site-packages/coalib/bears/Bear.py", line 116, in execute
E               return list(self.run_bear_from_section(args, kwargs) or [])
E             File "/usr/lib/python3.5/site-packages/coalib/bears/Bear.py", line 109, in run_bear_from_section
E               return self.run(*args, **kwargs)
E             File "/coala-bears/bears/r/FormatRBear.py", line 24, in run
E               return self.lint(filename, file)
E             File "/usr/lib/python3.5/site-packages/coalib/bearlib/abstractions/Lint.py", line 102, in lint
E               results = self.process_output(results_output, filename, file)
E             File "/coala-bears/bears/r/FormatRBear.py", line 16, in process_output
E               output = output[:-1] + (output[-1].strip()+"\n",)
E           IndexError: tuple index out of range
E           Command: Rscript -e 'library(formatR)' -e 'formatR::tidy_source("/tmp/tmpx0rnz8xf")'
E           Stdout:
E           Stderr:
E            Error in library(formatR) : there is no package called ‘formatR’
E           Execution halted

tl;rd

it would be kinda nice to have a compact listing with all bears and a status whether or not their dependencies are met. Or something. This way it's complicated and depressing trying to make stuff work
Mischa Krüger
@Makman2
Jun 13 2016 11:53
@fneu in case of the FormatRBear, @Asnelchristian is working on that using the new linter v2 API, and we are nearly done with merging^^
then there shouldn't be crash messages any more :+1:
(at least not for FormatRBear)
and we are trying to implement a dependency mechanism that works also with non-pip packages, I think @Adrianzatreanu does that :+1:
+ @Udayan12167 makes next gen bear design, which should improve general bear handling
so a big construction site is already set up :3
(btw I need to ping him...)
Lasse Schuirmann
@sils
Jun 13 2016 11:56
that is all only related
having a dependency state for the bear could be interesting
i.e. showing "Dependencies not satisfied" in the detailed show bears output
Mischa Krüger
@Makman2
Jun 13 2016 11:57
we have check_prerequisites :O and after @Adrianzatreanu makes his stuff we can improve that function for general bears imo :O
Fabian Neuschmidt
@fneu
Jun 13 2016 11:58
that would be really awesome
Lasse Schuirmann
@sils
Jun 13 2016 11:58
fwiw @fneu you should check out the latest coala, bear listing is simpler and more intuitive now
what's the ETA for @Asnelchristian s PR?
Fabian Neuschmidt
@fneu
Jun 13 2016 11:59
nice
Lasse Schuirmann
@sils
Jun 13 2016 11:59
@fneu file an issue? Shouldn't be too hard actually but may make listings of bears slow because actual actions may be pperformed
Mischa Krüger
@Makman2
Jun 13 2016 11:59
hopefully today
Fabian Neuschmidt
@fneu
Jun 13 2016 12:00
well I kind of filed the above as an issue already
Lasse Schuirmann
@sils
Jun 13 2016 12:00
you have this "coala is bad in general" issue
I'd rather have some small issues that we can actually adress :P
Fabian Neuschmidt
@fneu
Jun 13 2016 12:01
well change the title to "bear listing should show dependency state" or something
@sils1297 by the way has somebody thought about synchronizing the release versions of coala and coala-bears? they are going to be released together anyway, right?
It's kind of weird having 0.6.0 ~ 0.2.0, 0.7.0 ~ 0.3.0 etc.
and there wouldn't be a problem since the new version is bigger so we could just release the next bears as 0.7 imo
Mischa Krüger
@Makman2
Jun 13 2016 12:05
hm has never bothered me :3
and as soon as we have packages for each bear, it doesn't matter really any more imo^^
Fabian Neuschmidt
@fneu
Jun 13 2016 12:06
fair enough