Skip to content

fix: /// <reference path="..." static='true' />#427

Merged
mhegazy merged 3 commits into
microsoft:masterfrom
sparecycles:fix/reference-static-regex
Aug 13, 2014
Merged

fix: /// <reference path="..." static='true' />#427
mhegazy merged 3 commits into
microsoft:masterfrom
sparecycles:fix/reference-static-regex

Conversation

@sparecycles

Copy link
Copy Markdown
Contributor

The second quote of the static attribute was incorrectly
matched against the first quote of the path attribute.

The second quote of the static attribute was incorrectly
matched against the first quote of the path attribute.
@mhegazy

mhegazy commented Aug 11, 2014

Copy link
Copy Markdown
Contributor

Thanks for submitting this PR; two things:

@sparecycles

Copy link
Copy Markdown
Contributor Author

I've already completed the CLA, I am (was) AdamFreidin on codeplex.

I'll work on a unit test later today. Assuming you really think it's necessary to track that obviously poor regex-based XML-ish parsing needs a unit test to be incrementally improved.

@mhegazy

mhegazy commented Aug 11, 2014

Copy link
Copy Markdown
Contributor

Sorry @sparecycles, my bad. so it is just the test then :)

@CyrusNajmabadi

Copy link
Copy Markdown
Contributor

👍

@sparecycles

Copy link
Copy Markdown
Contributor Author

So, I added a test but the baseline reference/ folder currently has files in it and after running jake runtests and jake baseline-accept, it gets folders (project/ and projectOutput/). Rewriting/moving all the baseline files seems like too large a change, what am I doing wrong?

EDIT: here are the changes before running jake runtests and jake baseline-accept
https://github.com/sparecycles/TypeScript/tree/fix/reference-static-regex+tests

@mhegazy

mhegazy commented Aug 12, 2014

Copy link
Copy Markdown
Contributor

The test looks good. The projectoutput folder is a temp folder, you should not include it in your change. So either remove it after baseline-accept or delete it from local before accepting the baseline.

jake runtests
jake baseline-accept
@sparecycles

Copy link
Copy Markdown
Contributor Author

I integrated the tests and baseline update.

mhegazy added a commit that referenced this pull request Aug 13, 2014
fix: /// <reference path="..." static='true' />
@mhegazy mhegazy merged commit 2a106bf into microsoft:master Aug 13, 2014
@mhegazy

mhegazy commented Aug 13, 2014

Copy link
Copy Markdown
Contributor

thanks

@basarat

basarat commented Aug 13, 2014

Copy link
Copy Markdown
Contributor

What does static='true' on a reference comment do?

@mhegazy

mhegazy commented Aug 13, 2014

Copy link
Copy Markdown
Contributor

nothing :); it is only for back compat. back in the 0.8.* days we used it to indicate to the LS that this is a lib file and should not be retypechecked on every change. this since has become unviable with reopening and merging of declarations across files. what we care about, is if a /// reference has a static field we read it correctly..

@basarat

basarat commented Aug 13, 2014

Copy link
Copy Markdown
Contributor

@mhegazy cool. Thanks!

@sparecycles sparecycles deleted the fix/reference-static-regex branch September 24, 2014 20:11
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants