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

Generalize config file stuff #14

Open
robsimmons opened this issue Nov 14, 2011 · 4 comments
Open

Generalize config file stuff #14

robsimmons opened this issue Nov 14, 2011 · 4 comments

Comments

@robsimmons
Copy link
Member

Magenbluten is currently working on adding mercurial support, but in its current form it will need to be disabled by default lest we break support on computers without hg. This led me to think that it might be time to think about command-line ways of manipulating the $SMACKAGE_HOME/config file. What about something like this?

$ smackage config help
Manipulate configuration options; type `smackage config' to see current configuration options.

smackage {enable/disable} compiler {mlton,smlnj,polyml} (Currently unused)
smackage {enable/disable} protocol {git,hg} (Requires appropriate binary)
smackage {enable/disable} platform {osx,win,linux} (Multiple platforms are not recommend) <-- or allowed?
smackage {enable/disable} source <absolute filename or filename relative to smackage-home>

Configuration options are stored in /Users/rjsimmon/.smackage/config

Enabled by default:

  • source sources.local (no reason to disable this, as it's user-configurable as well)
  • protocol git (probably we can't allow this to be disabled for now)
@gian
Copy link
Member

gian commented Nov 14, 2011

I think I'm generally in favour of this scheme, although it doesn't seem like editing simple config files is considerably more difficult than passing a series of commands to smackage. Maybe you disagree, in which case I'm willing to defer to your judgement if you can think of a use case.

I suspect we could also have a quick first-guess at a sensible configuration by attempting to invoke 'git' and 'hg' and seeing what happens. Similarly, we could try to see which compilers are present in the same way.

@magenbluten
Copy link

Well "smackage {enable/disable} ..." is invariant to $SMACKAGE_HOME. File editing is of course not.

When would that "quick first-guess at a sensible configuration" be done? compiletime or runtime? I would like to
avoid unnecessary runtime "warnings" (in contrast to configuration errors) about "git" not being installed or some other feature missing.

@robsimmons
Copy link
Member Author

I think the idea would be that all that would happen when the "config" file is initially created.

@gian
Copy link
Member

gian commented Nov 15, 2011

Indeed.

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