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

MarkdownBear doesn't work anymore #1235

Open
coala-bot opened this issue Jan 1, 2017 · 28 comments
Open

MarkdownBear doesn't work anymore #1235

coala-bot opened this issue Jan 1, 2017 · 28 comments

Comments

@coala-bot
Copy link

It always wants to empty all my files, something's horribly wrong here.

This issue was found by @nutella25 and I can reproduce it.

type bug importance critical needs backport

Opened via gitter by @sils

@sils
Copy link
Member

sils commented Jan 1, 2017

my fault, wrong remark installed... we have to do something against this.

@sils sils closed this as completed Jan 1, 2017
@jayvdb
Copy link
Member

jayvdb commented Jan 2, 2017

Yea, the docker is broken for MarkdownBear : https://travis-ci.org/jayvdb/docker-coala-base/builds/188134615#L9730 . The cause is >= syntax in package.json.
I'm testing a fix.
The simple workaround is to edit the .travis.yml to add npm install -g remark-lint

@jayvdb jayvdb reopened this Jan 2, 2017
@jayvdb
Copy link
Member

jayvdb commented Jan 2, 2017

An easier workaround is to replace coala/base (which defaults to coala/base:latest) with coala/base:0.9 which uses the released version, which shouldnt have this bug.

jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Jan 2, 2017
Install npm packages locally and add the local binaries
to the PATH.

Fixes coala/coala-bears#1235
@sils
Copy link
Member

sils commented Jan 2, 2017

latest-pre the latest docker version should be the same as 0.9, I always trigger both when I rebuild the release and since latest is pulled by default it shouldn't be the prerelease, right?

jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Jan 2, 2017
Install npm packages locally and add the local binaries
to the PATH.

Fixes coala/coala-bears#1235
@jayvdb jayvdb reopened this Jan 4, 2017
@jayvdb
Copy link
Member

jayvdb commented Jan 4, 2017

the latest docker version should be the same as 0.9, ..

unfortunately this issue doesnt include a travis log to confirm which image was broken.

I tested in 0.9 again, and it worked: https://travis-ci.org/jayvdb/sails-docs/builds/188711823

@jayvdb
Copy link
Member

jayvdb commented Jan 4, 2017

See also #926

@sils
Copy link
Member

sils commented Jan 4, 2017

CC @namanyadav12 we think your code may have broken this bear.

@sils
Copy link
Member

sils commented Jan 4, 2017

So we may want to try reverting 57dbcc4

@namanyadav12
Copy link
Contributor

namanyadav12 commented Jan 4, 2017

Oh sorry for the troubled caused.
Although what seems to be the problem. Is it because i used >= in package.json

@namanyadav12
Copy link
Contributor

Will the problem solve if I change "remark-lint": ">=5.1.0" to "remark-lint": "~5.1.0"

@jayvdb
Copy link
Member

jayvdb commented Jan 4, 2017

Will the problem solve if I change "remark-lint": ">=5.1.0" to "remark-lint": "~5.1.0"

No. That was a problem with the docker.
I suggest you add more unit tests, and not use good files and bad files; instead, inspect the returned values to ensure they are exactly what they should be.

@namanyadav12
Copy link
Contributor

Ok

@jayvdb
Copy link
Member

jayvdb commented Jan 9, 2017

@namanyadav12 , your last message here was 5 days ago. You have been working on #1277 instead, which is quite distressing. This bug is the most critical problem in the pre-release.

Can you get this bear working correctly? promptly?
If not, we need to revert #1204 so we get back to a happy place.

namanyadav12 added a commit to namanyadav12/coala-bears that referenced this issue Jan 10, 2017
Also added a better test to check the exact message of the result.

Fixes coala#1235
@namanyadav12
Copy link
Contributor

namanyadav12 commented Jan 10, 2017

@jayvdb i thought you said that was a problem with the docker.
And MarkdownBear always worked fine on my laptop and i wasn't able to reproduce the error .
I have created a pr #1280 with another test which checks the exact message as requested.

@Mixih Mixih modified the milestones: 0.11, 0.10 Feb 24, 2017
@jayvdb
Copy link
Member

jayvdb commented Mar 8, 2017

https://travis-ci.org/jayvdb/discourse_docker/builds/208883544 is a build using the 0.10 docker image; the markdown files are wiped out.

@jayvdb
Copy link
Member

jayvdb commented Mar 22, 2017

Another example, in our own backyard : https://gitlab.com/yuki_is_bored/cobot/builds/12258827

@jayvdb
Copy link
Member

jayvdb commented Apr 18, 2017

I've confirmed in many different ways that the problem is in remark, and maybe isolated to specific versions (of node stuff?) in the docker image.

It can be reproduced by moving out of the coala-bears directory and using MarkdownBear, or remark with remark-line.
e.g.
https://travis-ci.org/jayvdb/coala/jobs/223015470#L802
and
https://travis-ci.org/jayvdb/docker-coala-base/builds/223013298
and
https://travis-ci.org/jayvdb/coala-bears/jobs/223038041#L3226

jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 18, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 18, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 19, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 19, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 19, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
@jayvdb jayvdb modified the milestones: 0.10.3, 0.11 Apr 20, 2017
@jayvdb
Copy link
Member

jayvdb commented Apr 20, 2017

So it is important to note that this can be fixed by the person who has installed the bear dependencies.
We should rel-note that in 0.10.2

Ideally we also raise a bug upstream, and/or try to workaround the problem in the bear, probably for 0.10.3.

@jayvdb jayvdb modified the milestones: 0.10.2, 0.10.3 Apr 20, 2017
@jayvdb
Copy link
Member

jayvdb commented Apr 20, 2017

Worth noting ... the docker .travis.yml now has a test for this.

And before we raise an upstream bug, using an old version of remark, we need to create a demo repo so it shows the problem clearly, and hopefully remark authors can easily see a fix. If we dont make it easy, they will close the bug and tell us to upgrade to the latest version of remark.

jayvdb added a commit to jayvdb/docker-coala-base that referenced this issue Apr 20, 2017
remark-cli needs to find its plugins.  When invoked in `/coala-bears`
directory, Node automatically looks in `node_modules`.  However if
the docker image is used normally the working directory will not
be `/coala-bears`.  Setting NODE_PATH ensures that the plugins can
be found.

Related to coala/coala-bears#1235
@jayvdb
Copy link
Member

jayvdb commented Apr 20, 2017

We could anchor a release note on #1630 , if that is merged and backported to 10.2.

@meetmangukiya
Copy link
Member

We are having a new release soon, still backport needed?

gosom pushed a commit to gosom/coala-bears that referenced this issue Jul 15, 2017
A better test for MarkdownBear to check the exact message
of the result for a maximum line length error.

Related to coala#1235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

9 participants