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

fix issue 14811 : allow to exclude current directory from search path in dmd #4823

Closed
wants to merge 8 commits into from

Conversation

timotheecour
Copy link
Contributor

dmd implicitly adds current directory to search path, causing trouble when user has both foo/fun1.d and fun1.d and cwd=foo. This fixes this by adding a flag -exclude_cwd_from_imports.

Reduced use case:
see https://github.com/timotheecour/dsnippet/tree/master/bug_14811

make
..//main.d(3): Error: module foo.fun1 from file fun1.d conflicts with another module fun1 from file ..//foo/fun1.d

With my modification (adds a flag -exclude_cwd_from_imports):
make with_flag

works

See also https://issues.dlang.org/show_bug.cgi?id=14811

@schuetzm
Copy link
Contributor

Service: https://issues.dlang.org/show_bug.cgi?id=14811

Can you explain why this is useful/needed?

Also, please use a more descriptive commit message than "_".

@timotheecour
Copy link
Contributor Author

Done

@schuetzm
Copy link
Contributor

@timotheecour It seems you haven't pushed your changes... Depending on how you did the changes, you probably need to use git push -f.

@timotheecour
Copy link
Contributor Author

amended commit message; I am seeing the changes now

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
14811 allow to exclude current directory from search path in dmd

@ibuclaw
Copy link
Member

ibuclaw commented Jan 10, 2018

@timotheecour - in sore need of rebasing here. Solution doesn't really seem very appropriate though.

@ibuclaw ibuclaw self-assigned this Jan 10, 2018
@JinShil
Copy link
Contributor

JinShil commented Jan 15, 2018

I think I would prefer that the current working directory was not hard coded in the compiler, but rather included by default as -I. in the dmd.conf file.

@JinShil
Copy link
Contributor

JinShil commented Jan 15, 2018

@timotheecour Should we close this?

@JinShil
Copy link
Contributor

JinShil commented Jan 21, 2018

This PR is awfully old and doesn't seem to have much support. Furthermore, queries to the author have gone unanswered, so I'm assuming this PR is abandoned.

I'm closing this for now; it can always be reopened or resubmitted.

@ibuclaw
Copy link
Member

ibuclaw commented Jan 22, 2018

Couple of notes.

  1. Seems like the intent was to implement the equivalent of the (deprecated) gcc -I-.
  2. I think you could get around this issue using the existing -mv switch, the bug in question is toeing the line between what should be considered compilable or intentional fail anyway.

@ibuclaw ibuclaw removed their assignment Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants