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

Register a SWIPL installed version? #19

Open
ssardina opened this issue Jul 3, 2020 · 2 comments
Open

Register a SWIPL installed version? #19

ssardina opened this issue Jul 3, 2020 · 2 comments

Comments

@ssardina
Copy link

ssardina commented Jul 3, 2020

How can I tell swivm that I have some SWIPL version installed, say in /usr/local/swipl-git? I don't want swivm to download and compile, just want to register some that I have in the system

Thanks.

@fnogatz
Copy link
Owner

fnogatz commented Jul 12, 2020

Nice idea! At first, I was thinking about new commands swivm register and swivm unregister, but maybe the simplest interface would be to just re-use the existing swivm alias by adding support for a path instead of only version numbers? So the interaction could be as follows:

> swivm ls
         v8.0.3
->      v8.1.28
default -> 8 (-> v8.1.28)

> swivm alias
default -> 8 (-> v8.1.28)

> swivm alias git /usr/local/swipl-git
git -> /usr/local/swipl-git

> swivm ls
         v8.0.3
->      v8.1.28
default -> 8 (-> v8.1.28)
git -> /usr/local/swipl-git

> swivm use git
Now using SWI-Prolog v8.3.3 (/usr/local/swipl-git)

> swivm unalias git
Deleted alias git - restore it with `swivm alias "git" /usr/local/swipl-git`

What do you think, @ssardina?

When I think about a possible implementation, I have the impression that this would result in allowing a path everywhere we currently expect version numbers or aliases (except for the commands ls-remote, version-remote, install), i.e. even swivm run /usr/local/swipl-git example.pl and swivm use /usr/local/swipl-git might be allowed. I am not yet sure if that's a nice consequence or possible sources of confusion 😃

@ssardina
Copy link
Author

Definitively, I would reuse/generalize the existing alias option.

I am not sure I understand the problem you describe in the 2nd para. :-)

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

2 participants