[Grace-core] Import statements

Lex Spoon lex at lexspoon.org
Wed Jun 5 07:56:30 PDT 2013


I'm afraid I do not have a good resource on hand for further reading
on the present conversation.

You are right that I have a strong opinion about Internet access
during a build! It goes against the craft, so much so that I find it
almost physically uncomfortable to contemplate. I agree that it's
different for students, educators, and researchers. The perspective I
am describing is that of a industry software developer in one of the
domains I'm familiar with (mass-market web apps, corporate intranet
software, and to a lesser extent shrink-wrap games).

Depending on a public Internet site in your build amounts to betting
the company on the behavior of people you can't influence. They might
bring the site down for maintenance the day before your big release.
They might delete an archive you are using. They might get a malware
infection. They might get slashdotted. If one of these things happens
for a student project, then the professor can go "gee darn" and grant
an extension. However, if your build of adwords.google.com fails, it's
just awful. I've seen it happen, for reasons other than third-party
dependencies, and it is not pretty.

That's already enough, but there are also some deeper problems. One of
them is that professional software developers control the inputs to
their builds. You want to be able to run a build twice and get the
same result. You want to be able to make a small change, rebuild, and
be confident that the only thing that changed is what you think you
changed. If you make an Internet request and use whatever the other
site gives you, then you are adding variables to your build. This is
especially bad when you think about builds of old revisions. If you
are building a version of your software from a year ago, what are the
odds that the relevant state of the Internet is the same as it was
back when you built it the first time?

On the WWW, this is a feature. I agree with the claim that URLs are
very successful on the web. However, that doesn't mean they will work
well for third-party dependencies. Unlike when browsing the web, you
don't want to upgrade your software to use a new third-party
dependency the split second the author posts it. You want to take your
time and try it out first. You might upgrade in a week, or a month, or
perhaps never. It's a decision the software developer makes, and the
language should be supportive.

Popping the stack, an industry developer is better off downloading
third-party dependencies as a deliberate step separate from ordinary
compilation. Thus, you want to assume there is a deliberate step where
a developer downloads a dependency and installs it into their local
archive. Once you assume that this is the case, I think the compiler
support is easy to figure out. The main thing is that the tool has
enough information to know where the root of the source hierarchy is.
For example, if you currently have a command line like this:

    gracec /home/bob/grace/hello/src/hello/hello.grace

You could change it to this:

    gracec /home/bob/grace/hello/src hello/hello.grace

That one space makes a world of difference.

Lex


More information about the Grace-core mailing list