Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix specs on Windows...again #99

Merged
merged 5 commits into from
Nov 20, 2015
Merged

Fix specs on Windows...again #99

merged 5 commits into from
Nov 20, 2015

Conversation

50Wliu
Copy link
Contributor

@50Wliu 50Wliu commented Nov 3, 2015

Specs were passing locally when I created #94...I swear! :P

Anyway, it seems like stack traces are sometimes returning file URIs for me which totally broke package name parsing. That has been fixed.

/cc @benogle

This also might help with #66.

if options.detail? and packageName = getPackageName(options.detail)
return packageName
if options.detail?
file = /(\((.+?):\d+|\((.+)\)|(.+))/.exec(options.detail)[1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this stuff go into getPackageName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the filePath version (L185)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just seems like there is filtering being done before it hits the getPackageName method. Should that filtering logic go in the getPackageName method?

return packageName
if options.detail?
packageName = getPackageName(options.detail)
return packageName if packageName?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this change? cc @maxbrunsfeld style 👀?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I forgot to fully revert it after I moved the regex out of this if. Fixing now...

@benogle
Copy link
Contributor

benogle commented Nov 11, 2015

Seems good to me. I defer to @maxbrunsfeld

@@ -183,6 +183,12 @@ class NotificationIssue
packagePaths[packageName] = fs.realpathSync(packagePath)

getPackageName = (filePath) =>
filePath = /(\((.+?):\d+|\((.+)\)|(.+))/.exec(filePath)[1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the nesting of capture groups here. Does item 1 in the match array represent the entire match, because the entire thing is wrapped in parens? If so, maybe you could just remove the outer parens and use item 0?

@maxbrunsfeld
Copy link
Contributor

🚢

50Wliu added a commit that referenced this pull request Nov 20, 2015
Fix specs on Windows...again
@50Wliu 50Wliu merged commit bbf75ed into master Nov 20, 2015
@50Wliu 50Wliu deleted the wl-windows-specs branch November 20, 2015 02:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants