[Swift-devel] Issues to resolve for the 0.96 config mechanism

Tim Armstrong tim.g.armstrong at gmail.com
Mon Jul 14 15:57:12 CDT 2014


I think the implicit versus explicit thing is a matter of taste; that said,
as a personal preference it seems more elegant and convenient to have a
powerful but explicit include mechanism so that there's an easy and obvious
way to include alternative files at any stage in the process.

A few observations/questions:
* As a user I'd find it really surprising that the implicit ./swift.conf
still is in effect when I provided an explicit command line config.  I'm
not aware of any other systems that behave like this.
* If you invoke a Swift script from another directory, does the config file
in your current directory or the script directory take effect?  It seems
counterintuitive to me that you would have to cd into the script directory
when you're already explicitly giving the path to the Swift script.
* Is there a way I can temporarily disable a config file on the search
path, beyond moving the file or overriding all of the keys?  If so, is this
method discoverable to users?
* If ./swift.conf is meant to correspond to a particular Swift script,
would it make more sense to have the config name match the script name?

- Tim


On Mon, Jul 14, 2014 at 3:06 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:

> If there are no comments or suggestions besides what has already been
> said, I'll keep the 5 step search path exactly as it is in 0.95. Please
> do comment if you have something to say. We're less likely to re-visit
> the issue in the future.
>
> Anyway, the second issue is whether we want automatic or explicit
> inheritance. In other words, do we want all of the 5 steps to be loaded
> in order, non-existing files being silently skipped, or do we want the
> first file in the search path to have to explicitly include others. Or
> do we want a mixed behavior (such as SWIFT_SITE_CONF and ./swift.conf
> both loaded automaticaly but not others)?
>
> Mihael
>
> On Mon, 2014-07-14 at 11:00 -0700, Mihael Hategan wrote:
> > Hi,
> >
> > So, first, when I say "gone" that means "it's not there right now in
> > trunk". This is work in progress, and I was hoping to get feedback from
> > everybody, hopefully based on use cases and experiences. This change
> > brings an opportunity to re-visit some of the things we have and see if
> > they make sense in the new context and make the right long-term
> > decisions.
> >
> > The first question is whether ~/.swift/swift.conf and ./swift.conf
> > should be explicitly in the search path, since SWIFT_SITE_CONF can do
> > both:
> >
> > export SWIFT_SITE_CONF=~/.swift/swift.conf
> > export SWIFT_SITE_CONF=./swift.conf
> >
> > Mihael
> >
> > On Sun, 2014-07-13 at 20:02 -0700, Mihael Hategan wrote:
> > > Sorry. This discussion went a bit off. I apologize.
> > >
> > > Search path. There are some changes. Here are the details:
> > >
> > > 1. swift/etc/swift.conf is still there
> > > 2. SWIFT_SITE_CONF is still there. It makes good sense.
> > > 3. ~/.swift/swift.conf is gone. SWIFT_SITE_CONF does the same and is
> > > explicit. Can be added back.
> > > 4. ./swift.conf is gone for reasons of magicality. Can also be added
> > > back.
> > > 5. -config on the command line is still there.
> > >
> > > The fundamental difference is that there is no "if it's not there,
> > > ignore silently and continue" behavior and there is no automated
> > > chaining. The user has to say what they want. It's a one-time operation
> > > per file. Very likely less work than the actual contents of the file,
> > > but less error-prone. It's a choice. That of safety vs. convenience. We
> > > can bias either way and supplement with tools.
> > >
> > > We could and should discuss the merits of what has changed. It might
> > > help if we do it one issue at a time.
> > >
> > > Mihael
> > >
> > > _______________________________________________
> > > Swift-devel mailing list
> > > Swift-devel at ci.uchicago.edu
> > > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
> >
> >
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20140714/013ffbde/attachment.html>


More information about the Swift-devel mailing list