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

Eliminate recommendation to use atsign-assert #1363

Merged
merged 3 commits into from
Sep 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions blog/2021/01/precompile_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ Tuple{typeof(BackedgeDemo.double), AbstractFloat}
@@

@@note
**Box 5** One other topic we've not yet discussed is that when `precompile` fails, it does so "almost" silently:
**Box 5** One other topic we've not yet discussed is that when `precompile` fails, historically (prior to Julia 1.7) it did so "almost" silently:

```julia
julia> methods(double)
Expand All @@ -625,8 +625,7 @@ false
```

Even though `double` can't be compiled for `String`, the corresponding `precompile` doesn't error, it only returns `false`.
If you want to monitor the utility of your `precompile` directives, sometimes it's useful to preface them with `@assert`; all's well if precompilation succeeds, but if changes to the package mean that the precompile directive has "gone bad," then you get an error.
Hopefully, such errors would be caught before shipping the package to users!
Julia 1.7 will warn about inactive precompile directives.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

maybe...

@@

## Summary
Expand Down