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

PARSE_ERROR on component with a name coinciding with one instantiated elsewhere #347

Closed
mpaluchowski opened this issue Jul 14, 2017 · 4 comments

Comments

@mpaluchowski
Copy link
Contributor

Here's an odd one. Place the following two components in the same directory:

// Tag.cfc
component {
	public any function foo() {
		var bar = createObject('component', 'somepackage.User');
	}
}
// User.cfc
component {
}

Note:

  • User.cfc can have any content or not, it's empty in this case.
  • User.cfc is not under somepackage but in the same directory as Tag.cfc. The error occurs also when there exists a component somepackage.User, in addition to the User here.

Running CFLint on a folder with these two files will report a PARSE_ERROR on User.cfc:

<issue severity="ERROR" id="PARSE_ERROR" message="PARSE_ERROR" category="CFLint" abbrev="PE">
  <location file="C:\Inbox\cflint-test\User.cfc" fileName="User.cfc" function="" column="0" line="1" message="Unable to parse" variable="">
    <Expression><![CDATA[]]></Expression>
  </location>
</issue>
@ryaneberly
Copy link
Contributor

@mpaluchowski, I can't reproduce this using the same files you mentioned and the code the from dev branch.
Tag.cfc
User.cfc
and somepackage/User.cfc

@mpaluchowski
Copy link
Contributor Author

True. Seems it doesn't occur when the referenced file is in place, even when there's one with the same filename. So, here's a recap:

This situation triggers the error:

Tag.cfc
User.cfc

These don't trigger the error:

Tag.cfc
SomethingElse.cfc
Tag.cfc
User.cfc
somepackage/User.cfc

@mpaluchowski
Copy link
Contributor Author

I one of our code bases I have 3,000 instances of this happening, so this one would be a blocker for use to use with our code. I'm not sure if conditions are identical (it's tricky and time consuming to test), so I'll wait for a fix for this one and see if that fixes also these issues. Otherwise, this could also occur in different circumstances.

ryaneberly added a commit that referenced this issue Jul 18, 2017
issue fixed.
@ryaneberly
Copy link
Contributor

@mpaluchowski , Thanks for helping isolate that one. It was caused by a plugin error. It is fixed.

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