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

Trace type stability checks we do #39

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Trace type stability checks we do #39

wants to merge 5 commits into from

Conversation

ulysses4ever
Copy link
Collaborator

@ulysses4ever ulysses4ever commented Dec 12, 2023

Store the checks in a checks file in the current dir.

The tracing mode is governed by a flag in the search config (SearchCfg). There's a default config with that flag on called trace_scfg. So, calling is_stable_method((@which f(1)), trace_cfg) should store the trace in the ./checks file.

Currently, the ./checks file is opened in an append mode so that we can make several calls to is_stable_method and see all the checks. This has pros and cons in terms of usability...

The format of the ./checks file is funny: its "pseudo method declarations". E.g. if we check f with input Int, we will produce function f(::Int) in the trace.

Perhaps, squash before merge.

when run is_stable_method(m,trace_scfg), you get a text file
checks/$m.name with types that were tried when checking type stability
This makes it easier to run "the whole" test suite with a custom scfg
(e.g. for tracing purposes). Note that some tests tailor scfg for their
needs, so we don't pass the default `test_scfg` to them.
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.

1 participant