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

Change default modules #33

Open
aaowens opened this issue Aug 25, 2019 · 3 comments
Open

Change default modules #33

aaowens opened this issue Aug 25, 2019 · 3 comments

Comments

@aaowens
Copy link

aaowens commented Aug 25, 2019

Traceur is substantially more useful for me when I use the modules keyword from #24 , otherwise I'm flooded with warnings from Base and other modules I didn't develop. For example, @trace naive_sum([1.]) modules = [Main].

I think the default behavior should be to not show warnings from these modules. New users of Traceur aren't likely to know about the modules keyword, so their initial experience is currently not very good. Experienced users can provide whatever modules they like.

Options:

  1. Default to modules = [Main]. For simple interactive use, this would be a big improvement. Package developers could manually list their packages.
  2. Default to everything except Base and stdlib modules. This would strip out most of the noise I see when using Traceur, while still showing warnings from packages which I might want to file an issue about. The end user is unlikely to be able to do anything about problems in core Julia code, and I think it's reasonable to assume our problems do not lie in that code.

I've been looking for a way to list all available modules so I could compute a set difference of that minus Base + stdlib to be default argument, but I haven't found a way to list them.

If this does not exist, one option would be to add a second keyword argument, skipmodules = []. The default could be skipmodules = [Base, (list stdlib here)]. Traceur would skip any warnings from modules in skipmodules.

@DilumAluthge
Copy link
Contributor

I've been thinking a little about this. Even though a user might not be developing Base or a standard library, the type instabilities that Traceur is finding will still impact the performance of their code, and therefore might still be relevant to a user that is wondering why their code is slow.

So I don't think that we should hide warnings from Base by default.

I do like the idea of having a keyword argument skipmodules = [] that would allow a user to easily skip one or more modules. I think that the default value should be skipmodules = []. If a user wants to ignore the warnings from Base, they could do so easily by specifying skipmodules = [Base].

But I do think it could be useful to show those warnings by default.

@DilumAluthge
Copy link
Contributor

When I get a chance, I'll work on implementing the skipmodules keyword argument.

@pfitzseb
Copy link
Member

In the meantime you can use something like modules=setdiff(Base.loaded_modules_array(), [Base, Core, ...]).

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

No branches or pull requests

3 participants