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

Ensure mainSourceFile is deduplicated properly #1410

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

s-ludwig
Copy link
Member

This forces the mainSourceFile to be normalized and converted to the native path format before being added to sourceFiles, so that when adding files later on with collectFiles matches up properly.

Fixes #1407.

@dlang-bot
Copy link
Collaborator

Thanks for your pull request, @s-ludwig!

@s-ludwig s-ludwig force-pushed the issue_1407_duplicate_main_source_file branch from dbf5649 to 972f3a3 Compare March 12, 2018 21:45
@s-ludwig s-ludwig changed the base branch from master to stable March 12, 2018 21:45
auto p = NativePath(this.mainSourceFile);
p.normalize();
dst.mainSourceFile = p.toNativeString();
dst.addSourceFiles(p.toNativeString());
Copy link
Member

Choose a reason for hiding this comment

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

I doubt it matters but the result of toNativeString could be cached.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll simply use dst.mainSourceFile.

BTW, would be good to get #1409 in, so that this one can be rebased on top before adding a change log entry.

This forces the mainSourceFile to be normalized and converted to the native path format before being added to sourceFiles, so that when adding files later on with collectFiles matches up properly.
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

Successfully merging this pull request may close these issues.

3 participants