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

IIncludeFileSystem not called anymore when using empty path or null in SourceFile #228

Open
mrvux opened this issue Apr 23, 2022 · 0 comments

Comments

@mrvux
Copy link
Contributor

mrvux commented Apr 23, 2022

found this (very small) issue when creating syntax tree with either null string and custom include resolver:

string path = null; var syntaxTree = SyntaxFactory.ParseSyntaxTree(new SourceFile(SourceText.From(code), path), null, myIncludeFileSystem);

if path is an empty string (or a null), include file system is never called.

if path is any string (not even an existing path), then it is called.

Will PR a fix that allows empty path or null string, since in some cases my files are just scripts and have no location, so include handler should still be called.

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

1 participant