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

Add start command to REPL API #412

Closed
wants to merge 10 commits into from

Conversation

00vareladavid
Copy link
Contributor

I figure most people issue a cd after generate when starting a new project (at least that's what makes sense to me, why would you create a project and then go do something else?). From a usability standpoint, it makes sense to provide a command to do both. Thoughts?

Note: this PR is just for reference, I don't know what your policy is and I didn't do extensive testing.

@KristofferC
Copy link
Member

Hm, it seems a bit excessive to have a completely new command that only provides a cd. We could think about defaulting to cd into the new package but I don't think there should be a completely separate verb for it.

StefanKarpinski and others added 9 commits June 25, 2018 16:44
This makes LOAD_PATH just a vector of strings again. Some
special syntaxes in JULIA_LOAD_PATH are handled specially:

- split on `:` or `;` (on Windows)
- replace the first empty entry with DEFAULT_LOAD_PATH
- ignore the remaining empty entries
- replace `@` with `current_env()`

Other special syntaxes are left alone and expanded during
load path lookup:

- occurrences of `#` in `@...` entries to version digits
- `@name` is looked up in the depot path
- `@` is replaced with `current_env()`

The last functionality is not accessible via JULIA_LOAD_PATH
in this version since `@` in that is expanded early. This does
allow putting a literal `@` in LOAD_PATH to get late expansion
to `current_env()` instead of early expansion.

Fixes #27411
@00vareladavid
Copy link
Contributor Author

Best left as an issue for later

@fredrikekre
Copy link
Member

We could make generate Foo do an implicit activate Foo withouth cding to it. This would be similar to init (although there we create the project in pwd()).

@StefanKarpinski
Copy link
Member

It very much seems like these could be combined somehow...

@00vareladavid
Copy link
Contributor Author

That makes sense to me.
The workflow I was thinking of is: generate Foo followed by add Example.
My gut reaction was that the add would apply to the environment I most recently handled (which would be Foo).

#418 is also relevant, they wanted to do a generate Foo followed by import Foo. Activating the environment would also make this workflow possible.

@00vareladavid
Copy link
Contributor Author

Actually, I though about #418 some more and the best fix for that seems to add a flag to dev. E.g. dev --generate.

generate Foo could be used if the focus is Foo.

dev --generate Foo can be used if you wish to add a dependency which does not exist yet (the focus would remain on the current environment). dev --generate Foo would not activate Foo and so the defaults would reflect the intended workflow.

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.

7 participants