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

Add @check and @should_not_warn. #20

Merged
merged 1 commit into from
Dec 25, 2018
Merged

Add @check and @should_not_warn. #20

merged 1 commit into from
Dec 25, 2018

Conversation

jamii
Copy link
Collaborator

@jamii jamii commented Dec 17, 2018

The intended usage is to tag inner loops with @should_not_warn and
then run existing tests inside @check to catch any regressions in type-stability.

The intended usage is to tag inner loops with @should_not_warn and
then run existing tests inside @check to catch any regressions in type-stability.
@jamii jamii requested review from MikeInnes and pfitzseb December 17, 2018 17:09
@jamii
Copy link
Collaborator Author

jamii commented Dec 17, 2018

@MikeInnes sorry, I requested you by accident and there is no way to unrequest :D

@jamii
Copy link
Collaborator Author

jamii commented Dec 17, 2018

Relevant discussion - JuliaLang/julia#10980

@pfitzseb
Copy link
Member

This generally looks good, but I don't like decorating the function definition with @should_not_warn much -- what do you thing of changing @check such that it also accepts a function (or vector of functions) that are not allowed to warn? We could then also have @check funcall(args) default to failing on all thrown warnings (basically #21).
Not having the decoration macro would also allow Traceur.jl to be a test-only dependency.

@jamii
Copy link
Collaborator Author

jamii commented Dec 18, 2018

I'm open to that. I expect we'll end up adding @should_not_warn to our codebase anyway, because:

  • all calls to @check will be using the same set of functions
  • annotating the function is a useful reminder when editing it

But it does make sense for it to avoid dragging Traceur in as a dep.

Copy link
Member

@pfitzseb pfitzseb left a comment

Choose a reason for hiding this comment

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

Alright, then I think this should be good to go and we can add the other functionality in a separate PR. Will merge this tomorrow barring any objections.

@pfitzseb pfitzseb merged commit a5952b3 into master Dec 25, 2018
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.

2 participants