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

Bug introduced in Version 0.11 and up #24

Closed
glassresistor opened this issue Jul 25, 2014 · 9 comments
Closed

Bug introduced in Version 0.11 and up #24

glassresistor opened this issue Jul 25, 2014 · 9 comments

Comments

@glassresistor
Copy link

I'm not totally sure as to how this bug was introduced or exactly what it does but somehow upgradeing from 0.10.0 to 0.11.0 cuases a bunch of my configuration variables to get trashed.

To test this checkout
git clone git@github.com:motherjones/smokejs.git
cd smokejs
npm install
sudo npm install -g grunt-cli
npm install mochify@0.11.0 (or above)

edit js/config.js and console.log(exports) at the bottom of the file.

grunt test

If you look at the console log MIRROR_DOMAIN MIRRORS_URL and MEDIA_STORE
are not set to the proper values anymore but instead are set to the path to jquery and a line number like so

{ MIRRORS_DOMAIN: '/home/mike/code/smokejs/node_modules/jquery/dist/jquery.js:2312',
  MIRRORS_URI: '/mirrors/',
  MIRRORS_URL: '/home/mike/code/smokejs/node_modules/jquery/dist/jquery.js:2312/mirrors/',
  AD_LOCATION: 'http://mj-tech.s3.amazonaws.com/ad_w_intersitial.html',
  MEDIA_STORE: '/home/mike/code/smokejs/node_modules/jquery/dist/jquery.js:1311',
  log: [Function],
  ERROR_HANDLER: [Function] }

Took me forever to figure out it was a mochify version. But if you downgrade it to
npm install mochify 0.10.0

you should get this

{ MIRRORS_DOMAIN: 'http://localhost:9001',
  MIRRORS_URI: '/mirrors/',
  MIRRORS_URL: 'http://localhost:9001/mirrors/',
  AD_LOCATION: 'http://mj-tech.s3.amazonaws.com/ad_w_intersitial.html',
  MEDIA_STORE: 'http://localhost:8000',
  log: [Function],
  ERROR_HANDLER: [Function] }
@glassresistor
Copy link
Author

I wish I had a better understanding of why this is happening but I just know that it is.

@mantoni
Copy link
Owner

mantoni commented Jul 25, 2014

Hahahaaaaa! Sorry, but that is soooo funny. Hahaha!
Let me explain, so you can laugh about this as well:

There was a feature in Phantomic to filter stack traces and map them back to the original sources using source maps. This has moved into a separate module (https://github.com/mantoni/source-mapper.js) and is now used to filter node output as well (e.g. mochify --node).

With the move into the new project I found more cases where the URLs had to be mapped for node and made the regular expression more generic. A bit too generic as it seems. Your console output gets changed because http://localhost:9001 is replaced with jquery.js:2312 using a source maps lookup. I don't think your variable values have changed.

@glassresistor
Copy link
Author

Hum interesting might want to clean that up some more if you can, cause it
messed me up for about a day. Let me see if the test passes now that i've
got it working.

On Fri, Jul 25, 2014 at 12:10 PM, Maximilian Antoni <
notifications@github.com> wrote:

Hahahaaaaa! Sorry, but that is soooo funny. Hahaha!
Let me explain, so you can laugh about this as well:

There was a feature in Phantomic to filter stack traces and map them back
to the original sources using source maps. This has moved into a separate
module (https://github.com/mantoni/source-mapper.js) and is now used to
filter node output as well (e.g. mochify --node).

With the move into the new project I found more cases where the URLs had
to be mapped for node and made the regular expression more generic. A bit
too generic as it seems. Your console output gets changed because
http://localhost:9001 is replaced with jquery.js:2312 using a source maps
lookup. I don't think your variable values have changed.


Reply to this email directly or view it on GitHub
#24 (comment).

Mikela

@glassresistor
Copy link
Author

Yeah looks like the tests are passing now even though the output is messed
up. For now this is going to keep me from updating.

On Fri, Jul 25, 2014 at 12:15 PM, Mikela Clemmons glassresistor@gmail.com
wrote:

Hum interesting might want to clean that up some more if you can, cause it
messed me up for about a day. Let me see if the test passes now that i've
got it working.

On Fri, Jul 25, 2014 at 12:10 PM, Maximilian Antoni <
notifications@github.com> wrote:

Hahahaaaaa! Sorry, but that is soooo funny. Hahaha!
Let me explain, so you can laugh about this as well:

There was a feature in Phantomic to filter stack traces and map them back
to the original sources using source maps. This has moved into a separate
module (https://github.com/mantoni/source-mapper.js) and is now used to
filter node output as well (e.g. mochify --node).

With the move into the new project I found more cases where the URLs had
to be mapped for node and made the regular expression more generic. A bit
too generic as it seems. Your console output gets changed because
http://localhost:9001 is replaced with jquery.js:2312 using a source
maps lookup. I don't think your variable values have changed.


Reply to this email directly or view it on GitHub
#24 (comment).

Mikela

Mikela

@mantoni
Copy link
Owner

mantoni commented Jul 25, 2014

Sorry about that. I'll see if I can implement some more clever matching.

@mantoni mantoni closed this as completed Jul 25, 2014
@glassresistor
Copy link
Author

No sorry necessary still think your a decent package maintainer link me the place you do this and i might make a PR

@mantoni
Copy link
Owner

mantoni commented Jul 25, 2014

@mantoni
Copy link
Owner

mantoni commented Jul 25, 2014

0.11.3 should fix this problem.

@glassresistor
Copy link
Author

best

On Fri, Jul 25, 2014 at 1:49 PM, Maximilian Antoni <notifications@github.com

wrote:

0.11.3 should fix this problem.


Reply to this email directly or view it on GitHub
#24 (comment).

Mikela

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants