D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17434 - [REG: 2.073] import lookup ignores public import.
Summary: [REG: 2.073] import lookup ignores public import.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2017-05-25 13:12 UTC by Mike Wey
Modified: 2022-04-08 06:59 UTC (History)
2 users (show)

See Also:


Attachments
Test case (828 bytes, application/zip)
2017-05-25 13:12 UTC, Mike Wey
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Mike Wey 2017-05-25 13:12:13 UTC
Created attachment 1647 [details]
Test case

Since dmd version 2.073 the attached test case generates a deprecation warning:

> $dmd *.d test/*.d
> main.d(7): Deprecation: imp.test is not visible from module main

Swapping the imports in imp.d so that the public import is listed first fixes the warning.

This seems related to #15900.
Comment 1 Walter Bright 2018-05-17 04:14:36 UTC
--------- imp.d ------------
module imp;

private import test.test1;
public  import test.test2;
--------- main.d -----------
module main;

import imp;

void main()
{
        test.test2.testing();
}
--------- test/test1.d -------
module test.test1;
--------- test/test2.d -------
module test.test2;

void testing()
{
        return;
}
Comment 2 Dlang Bot 2022-03-31 14:53:16 UTC
@RazvanN7 updated dlang/dmd pull request #13934 "Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import." fixing this issue:

- Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import.

https://github.com/dlang/dmd/pull/13934
Comment 3 Dlang Bot 2022-03-31 18:13:28 UTC
dlang/dmd pull request #13934 "Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import." was merged into stable:

- b1078a9d28538c9b65933c9115141ee5a893536c by RazvanN7:
  Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import.

https://github.com/dlang/dmd/pull/13934
Comment 4 Dlang Bot 2022-04-08 06:59:54 UTC
dlang/dmd pull request #13962 "merge stable" was merged into master:

- 0f4d152e06630418a315dbb62e0824dd6eb1972d by Razvan Nitu:
  Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import. (#13934)
  
  Fix Issue 17434 -  [REG: 2.073] import lookup ignores public import.
  
  Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
  Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>

https://github.com/dlang/dmd/pull/13962