Skip to content

Conversation

@wilzbach
Copy link
Contributor

While the underlying issue is https://issues.dlang.org/show_bug.cgi?id=19873, fixing this allows the Phobos PR to move on for now.

tl;dr: the publictest extractor now extracts the respective system attributes too.

Required for dlang/phobos#6931

@wilzbach wilzbach requested a review from CyberShadow as a code owner May 14, 2019 18:15
@wilzbach wilzbach force-pushed the unittest-attributes branch from afdcdc4 to cee8eda Compare May 14, 2019 18:15
@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.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + tools#369"

@wilzbach
Copy link
Contributor Author

(passing on TravisCI now - AppVeyor failure is unrelated.)

@wilzbach wilzbach merged commit 8bce501 into dlang:master May 14, 2019
@wilzbach wilzbach deleted the unittest-attributes branch May 14, 2019 21:15
if (!predefinedAttributes.canFind(atText))
continue;

outFile.write(text("@", atText, " "));
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this would work with attributes whose syntax doesn't start with @ , like pure and nothrow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, but DScanner treats these guys differently:

$ dscanner --ast foo.d | xmllint --format -
<?xml version="1.0"?>
<module>
  <declaration>
    <attribute attribute="pure"/>
    <attribute>
      <atAttribute>
        <identifier>safe</identifier>
      </atAttribute>
    </attribute>
    <unittest>
      <blockStatement>
</blockStatement>
    </unittest>
  </declaration>
</module>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But yeah it's probably a good idea to extract these guys too while we're at it: #371

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.

4 participants