These are chat archives for coala/coala-bears

13th
Sep 2016
AbdealiJK
@AbdealiJK
Sep 13 2016 05:41
It would be really really nice (and a good test) if we have a Dockerfile for Ubuntu, Fedora, and Tumbleweed, which uses cib to install the bears in each. this way we'll know exactly which bears work in which OSes (and test DistributionRequirement)
Fabian Neuschmidt
@fneu
Sep 13 2016 07:06
@AbdealiJK I'm doing this for development atm. I got wrappers for all package managers working yesterday.
Fabian Neuschmidt
@fneu
Sep 13 2016 07:11
Go and Npm are still giving me small headaches with the setup, the rest is pretty reliable. I think it will be a while, but afterwards we should definitely do some kind of docker tests. I'll probably mock subprocess or something for the unittests, to which docker tests would be a nice addition.
Anyway I'll resort so sils-style learning sessions for the next couple of days, so don't expect too much.
Adhityaa
@adtac
Sep 13 2016 07:45
What are "sils-style learning sessions"? :P
I'd like to learn them too
Fabian Neuschmidt
@fneu
Sep 13 2016 07:59

yesterday in the coala main channel

@sils1297 is lazy enough to not look into it properly right now though...
@sils1297 just had 10 intensive hours of exam learning.

Adhityaa
@adtac
Sep 13 2016 08:00
hah I have an exam tomorrow, I'll try this out :)
Fabian Neuschmidt
@fneu
Sep 13 2016 08:01
we're all in the same boat. He might even write today, not sure. I have until Thursday. Good Luck.
Adhityaa
@adtac
Sep 13 2016 08:01
Oh you're allowed to take the exam any day you want?
Fabian Neuschmidt
@fneu
Sep 13 2016 08:02
nah, different exams for anybody ;)
Adhityaa
@adtac
Sep 13 2016 08:02
Anyway good luck to you, Lasse and me :P
Fabian Neuschmidt
@fneu
Sep 13 2016 08:02
:+1:
Meet Mangukiya
@meetmangukiya
Sep 13 2016 08:14
me too, I got exams from saturday onwards :P
Lasse Schuirmann
@sils
Sep 13 2016 09:08
mine is tomorrow at 9am
meetmangukiya @meetmangukiya feels exams' season is hitting coalians with a storm ;)
Lasse Schuirmann
@sils
Sep 13 2016 09:19
:zzz: I could sleep the whole day instead of learning
sims1253 @sims1253 feels guilt for sils lack of sleep
Lasse Schuirmann
@sils
Sep 13 2016 09:34
nah @sims1253 I had the same feeling over the last couple of days
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:35
Would we like a bear that'll list all the classes and functions in that classes in a text file or STDOUT ?
Just so we don't have to go through all the files in the project :/
Lasse Schuirmann
@sils
Sep 13 2016 09:36
for what purpose exactly?
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:37
function explorer, tracking the functions/classes in the project.
I'm not sure about it yet :/
Lasse Schuirmann
@sils
Sep 13 2016 09:37
I think we definitely want that as a bear that can be used by other bears
to do other thing
but on it's own it doesn't sound like a thing useful to users to me
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:38
But actually that'll need different files for different programming language.
Lasse Schuirmann
@sils
Sep 13 2016 09:39
well not necessarily, take a look at the AnnotationBear
it's language independent
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:39
I'd like to write such a bear, if you approve, I may start, if we want that bear for other bears?
Lasse Schuirmann
@sils
Sep 13 2016 09:39
make sure to speak with @abhsag24 and @SanketDG about it
and you usually don't want to start if you don't have a clear usecase, i.e. if you don't know exactly what benefits it has for our users
because then you usually end up wasting time on developing things nobody needs, sometimes not even you
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:41
ok :see_no_evil: then I'd think over it again.
sils @sils1297 has developed lots of useless stuff :P
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:43
Actually I don't think it'd need to inherit itself from coala's bear classes :/ though I haven't gone through it
Lasse Schuirmann
@sils
Sep 13 2016 09:43
what you're thinking of is also rather complicated to do language independently, if you're just looking for the next step, just take a look at difficulty/low stuff
there's lots of nice stuff there, doable but very rewarding
also I think you're already assigned on a bunch of things
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:44
afaik only one issue :/ and one MR on gitlab
I asked for more info on the diff issue, I didn't understand it well. No update on that one yet, take a look at it if you have time.
Lasse Schuirmann
@sils
Sep 13 2016 09:46
oh the diff one
that's a cool one, this has a major impact on usability
hehehe sims added the cool and awesome label rightfully :)
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:47

that were sims words, its a quote

Show the function code belongs to in diffs. Like in git diffs the context line after the hunk metadata.
@meetmangukiya you wanna try this and it should be simple :)

I didn't understand that, that's why I left a ? in the end of the quote
Lasse Schuirmann
@sils
Sep 13 2016 09:48
make a git show
@@ -77,7 +77,7 @@ def run_coala(log_printer=None,

         config_file = os.path.abspath(str(sections["default"].get("config")))

-        settings_hash = get_settings_hash(sections)
+        settings_hash = get_settings_hash(sections, targets)
         flush_cache = bool(sections["default"].get("flush_cache", False) or
                            settings_changed(log_printer, settings_hash))
usually looks like this
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:49
I never used git show earlier, I'll see what it does.
Lasse Schuirmann
@sils
Sep 13 2016 09:49
as you see the first line with the @s
shows the function definition
it's way easier to understand what the code does because git gives me information what function it resides in
even though the function definition would normally not be in the diff
we want the same thing for coala output
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:50
So git understands function definitions ?
of all languages?
Lasse Schuirmann
@sils
Sep 13 2016 09:51
no git is stupid, it only looks at indentation
I think
but it works quite well
it doesn't have to be always correct but if it hits in 99% of all cases that's certainly worth a lot
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:51
ok, what file is to be changed for this?
use git grep to find things, I guess ConsoleInteraction.py
I'll leave the rest to you ;)
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:52
ok :+1:
importance/high do we have a deadline ?
Lasse Schuirmann
@sils
Sep 13 2016 09:53
ideally this would be done in one or two weeks
if you feel uncomfortable just don't pick it up, then somebody else will do t
Meet Mangukiya
@meetmangukiya
Sep 13 2016 09:54
I can try though :/
Lasse Schuirmann
@sils
Sep 13 2016 09:55
sure, it shouldn't be too har
d
Meet Mangukiya
@meetmangukiya
Sep 13 2016 10:02
git grep will add git as a dependency
Fabian Neuschmidt
@fneu
Sep 13 2016 10:19

@meetmangukiya no don't use it in the code, use it to find the code where you need to change things.
basically wherever we print the diff, change it so that it will also show these context lines.

btw. the idea is totally awesome

Meet Mangukiya
@meetmangukiya
Sep 13 2016 10:20
I think it is to facilitate backtracking the diff :/
I think I'll use os.system("git grep <to be greped>") and use the output maybe :/
Lasse Schuirmann
@sils
Sep 13 2016 10:21
noooooo git grep is just for you to find the place to do the changes
Meet Mangukiya
@meetmangukiya
Sep 13 2016 10:22
ohh.. you meant the file, sorry :laughing:
Adhityaa
@adtac
Sep 13 2016 10:45
Plug for ag which is supposed to be orders of magnitude faster :P