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

Relax support.function.js and support.constant.js regex #158

Merged
merged 4 commits into from
Aug 4, 2015

Conversation

winstliu
Copy link
Contributor

@winstliu winstliu commented Jun 9, 2015

The patterns they match are no longer a hardcoded set of words and are now just \w+ to match any word sequence.

A side effect of this change is that there can no longer be support.{function|constant}.dom.js capturing groups anymore unless you wanted .dom to have a specific set of patterns while support.{function|constant} didn't. In that sense, this is a pretty major change.

Refs #137.

@dead-claudia
Copy link
Contributor

I like how that would look.

@Victorystick
Copy link
Contributor

Looks great.

winstliu pushed a commit that referenced this pull request Aug 4, 2015
Relax support.function.js and support.constant.js regex
@winstliu winstliu merged commit eae8a7c into master Aug 4, 2015
@winstliu
Copy link
Contributor Author

winstliu commented Aug 4, 2015

🚢

@winstliu winstliu deleted the wl-relax-regex branch August 4, 2015 22:27
@kevinsawicki
Copy link
Contributor

I published 0.88 that included this and bumped it on atom/atom and it caused a few CI failures because of some scope comparisons in some core specs that need to be tweaked:

>> TokenizedBuffer
>>   when the buffer contains soft-tabs
>>     when the buffer is fully tokenized
>>       when there is a buffer change that is smaller than the chunk size
>>         when lines are both updated and removed
>>           it updates tokens to reflect the change
>>             Expected { value : 'foo', scopes : [ 'source.js', 'support.function.js' ], isAtomic : false, isHardTab : false, bufferDelta : 3, hasInvisibleCharacters : undefined, hasPairedCharacter : false, isSoftWrapIndentation : false, firstNonWhitespaceIndex : null, firstTrailingWhitespaceIndex : null, screenDelta : 3 } to equal { value : 'foo', scopes : [ 'source.js' ] }.
>>               at [object Object].<anonymous> (/private/var/lib/jenkins/workspace/atom/spec/tokenized-buffer-spec.coffee:200:70)
>>               at _fulfilled (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:794:54)
>>               at self.promiseDispatch.done (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:823:30)
>>               at Promise.promise.promiseDispatch (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:756:13)
>>               at /private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:564:44
>>               at flush (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:110:17)
>>               at process._tickCallback (node.js:357:13)
>>         when lines are both updated and inserted
>>           it updates tokens to reflect the change
>>             Expected { value : 'foo', scopes : [ 'source.js', 'support.function.js' ], isAtomic : false, isHardTab : false, bufferDelta : 3, hasInvisibleCharacters : undefined, hasPairedCharacter : false, isSoftWrapIndentation : false, firstNonWhitespaceIndex : null, firstTrailingWhitespaceIndex : null, screenDelta : 3 } to equal { value : 'foo', scopes : [ 'source.js' ] }.
>>               at [object Object].<anonymous> (/private/var/lib/jenkins/workspace/atom/spec/tokenized-buffer-spec.coffee:244:70)
>>               at _fulfilled (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:794:54)
>>               at self.promiseDispatch.done (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:823:30)
>>               at Promise.promise.promiseDispatch (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:756:13)
>>               at /private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:564:44
>>               at flush (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:110:17)
>>               at process._tickCallback (node.js:357:13)
>>             Expected { value : 'bar', scopes : [ 'source.js', 'support.function.js' ], isAtomic : false, isHardTab : false, bufferDelta : 3, hasInvisibleCharacters : undefined, hasPairedCharacter : false, isSoftWrapIndentation : false, firstNonWhitespaceIndex : null, firstTrailingWhitespaceIndex : null, screenDelta : 3 } to equal { value : 'bar', scopes : [ 'source.js' ] }.
>>               at [object Object].<anonymous> (/private/var/lib/jenkins/workspace/atom/spec/tokenized-buffer-spec.coffee:245:70)
>>               at _fulfilled (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:794:54)
>>               at self.promiseDispatch.done (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:823:30)
>>               at Promise.promise.promiseDispatch (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:756:13)
>>               at /private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:564:44
>>               at flush (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:110:17)
>>               at process._tickCallback (node.js:357:13)
>>             Expected { value : 'baz', scopes : [ 'source.js', 'support.function.js' ], isAtomic : false, isHardTab : false, bufferDelta : 3, hasInvisibleCharacters : undefined, hasPairedCharacter : false, isSoftWrapIndentation : false, firstNonWhitespaceIndex : null, firstTrailingWhitespaceIndex : null, screenDelta : 3 } to equal { value : 'baz', scopes : [ 'source.js' ] }.
>>               at [object Object].<anonymous> (/private/var/lib/jenkins/workspace/atom/spec/tokenized-buffer-spec.coffee:246:70)
>>               at _fulfilled (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:794:54)
>>               at self.promiseDispatch.done (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:823:30)
>>               at Promise.promise.promiseDispatch (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:756:13)
>>               at /private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:564:44
>>               at flush (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:110:17)
>>               at process._tickCallback (node.js:357:13)
>>             Expected { value : 'quux', scopes : [ 'source.js', 'support.function.js' ], isAtomic : false, isHardTab : false, bufferDelta : 4, hasInvisibleCharacters : undefined, hasPairedCharacter : false, isSoftWrapIndentation : false, firstNonWhitespaceIndex : null, firstTrailingWhitespaceIndex : null, screenDelta : 4 } to equal { value : 'quux', scopes : [ 'source.js' ] }.
>>               at [object Object].<anonymous> (/private/var/lib/jenkins/workspace/atom/spec/tokenized-buffer-spec.coffee:249:70)
>>               at _fulfilled (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:794:54)
>>               at self.promiseDispatch.done (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:823:30)
>>               at Promise.promise.promiseDispatch (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:756:13)
>>               at /private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:564:44
>>               at flush (/private/var/lib/jenkins/workspace/atom/node_modules/q/q.js:110:17)
>>               at process._tickCallback (node.js:357:13)

@kevinsawicki
Copy link
Contributor

@50Wliu I'm going to revert this PR to publish around this change and land the other unreleased changes on atom/atom until we figure out the broken specs from this PR.

@winstliu
Copy link
Contributor Author

@kevinsawicki I was actually thinking of reverting this myself in order to try to merge this one with #146 😄. When I get back to it I'll make sure to also test the core specs.

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.

4 participants