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

Module name different when evaluated at different line #179

Closed
xgdgsc opened this issue Oct 23, 2018 · 6 comments
Closed

Module name different when evaluated at different line #179

xgdgsc opened this issue Oct 23, 2018 · 6 comments

Comments

@xgdgsc
Copy link

xgdgsc commented Oct 23, 2018

Details

  • Atom version: 1.28.1
  • Julia version: 1.0.1
  • OS: ubuntu 18.04
  • Package versions:
    • Atom.jl: v"0.7.8"
    • julia-client: 0.7.8
    • ink: 0.9.11

Steps to reproduce

  1. Use julia client inside atom and write a module
  2. as the following image shows, when you press ctrl+enter at line 2, the module would be Main.Test2.Test2, with duplicated level of module name. While if you press ctrl+enter at line 1 or 3, it would give the correct result of Main.Test.

image

@pfitzseb
Copy link
Member

pfitzseb commented Oct 23, 2018

That's working as intended (mostly) -- try with

module Test
1+1
end

instead. If you have the cursor on line 2 we'll eval 1+1 inside of Main.Test.

In your example, pressing Ctrl-Enter shouldn't do anything on line 2, but I don't feel like this is really problematic behaviour.

@xgdgsc
Copy link
Author

xgdgsc commented Oct 23, 2018

When I declare some types in the module and evaluates, it isn' t what I expect, though.

@pfitzseb
Copy link
Member

image

What do you expect?

@xgdgsc
Copy link
Author

xgdgsc commented Oct 23, 2018

image
Thanks. I'm new to julia. I don' t get the rationality when I click ctrl+enter inside the module struct and get the Main.Test.Test thing. I thought I could just change things inside the module and it would all go to the updated Main.Test.

@pfitzseb
Copy link
Member

Just re-eval the module again so that it looks like this:
image

@xgdgsc
Copy link
Author

xgdgsc commented Oct 23, 2018

But I have to move cursor to the end or top, which can be unproductive for large modules, is it possible to do that in the middle?

@aviatesk aviatesk closed this as completed Nov 7, 2019
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