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 module to Main #131

Merged
merged 7 commits into from
Jun 23, 2021
Merged

Change default module to Main #131

merged 7 commits into from
Jun 23, 2021

Conversation

rikhuijzer
Copy link
Collaborator

@rikhuijzer rikhuijzer commented Jun 23, 2021

This PR fixes an inconsistency in the behaviour of @sco and sco. The former used to evaluate code inside M::Module by default, whereas sco evalutes code in Main::Module by default. Given that normal usage on the REPL evaluates everything in Main, I decided to make that the default.

This means that code which used to write f() where f is a function inside MyModule should be replaced by MyModule.f() or M.f() after M = MyModule is set.

It would also be possible for users to export f inside MyModule to allow calling f() directly, so Main is definitely the better choice. Note that dependencies from MyModule can easily be made available to Main by using @reexport.

Also, due to the more capable gen(::Vector), gen(::Function) is now removed.

Also, with this PR, users can also more strictly enforce no auto-detection for captions or labels by setting nothing. For missing, auto-detection will occur.

Closes #130.

@rikhuijzer rikhuijzer changed the title Change default module Change default module to Main Jun 23, 2021
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.

Inconsistency between the module for evaluation of sco and @sco
1 participant