Skip to content

Conversation

@wilzbach
Copy link
Contributor

@wilzbach wilzbach commented Jul 5, 2017

Very very old versions of D (well into 0.x) had imports public by default,
like C header files. This modernizes the codebase and removes the
redundant private access specifier.
This has been done with:

sed "s/private import/import/g" -i **/*.d

See also: #5546 (comment)

CC @CyberShadow

I don't think it's worth adding a check here, because no one uses private import nowadays.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@CyberShadow
Copy link
Member

sed "s/private import/import/g" -i **/*.d

A public: on an undecorated import will make it public, have you checked that the imports aren't prefixed with one?

@wilzbach wilzbach force-pushed the remove-private-imports branch 2 times, most recently from 869768f to fdf795b Compare July 6, 2017 01:08
wilzbach added 2 commits July 11, 2017 12:28
Very very old versions of D (well into 0.x) had imports public by default,
like C header files. This modernizes the codebase and removes the
redundant `private` access specifier.
This has been done with:

sed "s/private import/import/g" -i **/*.d
@wilzbach wilzbach force-pushed the remove-private-imports branch from fdf795b to e8806ad Compare July 11, 2017 10:29
@wilzbach
Copy link
Contributor Author

A public: on an undecorated import will make it public, have you checked that the imports aren't prefixed with one?

Yes, the only tricky bit is std.uni, for the other files it's mostly the header imports only, so easy to verify.

Copy link
Contributor

@JackStouffer JackStouffer left a comment

Choose a reason for hiding this comment

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

looks reasonable

@dlang-bot dlang-bot merged commit c09200b into dlang:master Jul 11, 2017
@wilzbach wilzbach deleted the remove-private-imports branch December 11, 2017 02:13
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.

4 participants