Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: compiler default

Project highlights: Architectural Overview

joist
Discussion topic

Hide all messages in topic

All messages in topic

Re: [helm-dev] compiler default

Author edk
Full name Ed Korthof
Date 2000-12-15 01:00:16 PST
Message On Thu, Dec 14, 2000 at 10:43:09PM -0800, Jon Stevens wrote:
> on 12/14/2000 3:49 PM, "Manoj Kasichainula" <manoj at collab dot net> wrote:
>
> > On Thu, Dec 14, 2000 at 02:19:55PM -0800, Ed Korthof wrote:
> >> i'd like to change the build-*.sh scripts so that jikes is the default
> >> (if it can be found) rather than javac.
> >
> >> of course -- checking to see if jikes is installed is a bit of a pain --
> >
> >> the logic is : if JAVAC is set, use that (whatever it is). if not, and
> >> if JIKES is set, use jikes. if neither of these is true, use which to
> >> look for jikes in the PATH; if we find it, use jikes. otherwise, use
> >> javac.
> >
> > This sounds like a lot of work...
> >
> > How about just running $SANDBOX/bin/javac, and have that be a symlink
> > or script pointing to the appropriate compiler?
> >
> >
> How is that more work than just setting an environment variable?
>
> Actually, I would simplify the above by simply doing the following:
>
> look for JIKES=yes
> if JIKES == yes
> use jikes
> else
> look for JAVA_HOME
> if -z JAVA_HOME
> then fail
> else
> use JAVA_HOME/bin/javac

looking at this -- i find it really weird that you set
'JIKES={anything}' in order to set JAVAC to jikes. why not simply set
JAVAC directly? i started with a feeling of unease wrt that.

besides that -- the fact that the shell scripts default to javac is
annoying in a development environment. sure, there are ways to fix this
-- but it's been a pain on our shared dev boxes. with sc-dev1, i set
things up so that bash users would default to jikes ... we can continue
down that path, doing an extra step in system install/configuration for
each new box to solve this, or integrating this step into our rpms
(thereby poluting the environment even more than we already are).

but when i start imagining that -- i have to wonder if it makes any
sense at all. why would *anyone* want to default to javac if jikes is
available? if there's no good reason to do so, then defaulting to jikes
(when its available) makes sense. i don't care if we use the approach i
outlined or another; but i see no reason not to try to make life easier
for our users.

moving the complexity to system install or individual user configuration
doesn't remove it -- it just shifts the burden. imo, in this case, it
produces a net increase in the work required (unless JIKES=yes is a
standard way in Java softare to choose jikes over javac).

cheers --

ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 650-228-2527 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=

Re: [joist-dev] Re: [helm-dev] compiler default

Author Jon Stevens <jon at latchkey dot com>
Full name Jon Stevens <jon at latchkey dot com>
Date 2000-12-14 22:59:02 PST
Message on 12/14/2000 10:48 PM, "Josh Lucas" <lucas at collab dot net> wrote:

> That is already basically what we are doing...
>
> Testing for JIKES and if it is there, set JAVAC=jikes, if not, set
> JAVAC=classic.
>
>
> josh

perfect.

--
Honk if you love peace and quiet.

Re: [joist-dev] Re: [helm-dev] compiler default

Author deploy
Full name Deployment Pseudo-user
Date 2000-12-14 22:48:49 PST
Message On Thu, 14 Dec 2000, Jon Stevens wrote:

> on 12/14/2000 3:49 PM, "Manoj Kasichainula" <manoj at collab dot net> wrote:
>
> > On Thu, Dec 14, 2000 at 02:19:55PM -0800, Ed Korthof wrote:
> >> i'd like to change the build-*.sh scripts so that jikes is the default
> >> (if it can be found) rather than javac.
> >
> >> of course -- checking to see if jikes is installed is a bit of a pain --
> >
> >> the logic is : if JAVAC is set, use that (whatever it is). if not, and
> >> if JIKES is set, use jikes. if neither of these is true, use which to
> >> look for jikes in the PATH; if we find it, use jikes. otherwise, use
> >> javac.
> >
> > This sounds like a lot of work...
> >
> > How about just running $SANDBOX/bin/javac, and have that be a symlink
> > or script pointing to the appropriate compiler?
> >
> >
> How is that more work than just setting an environment variable?
>
> Actually, I would simplify the above by simply doing the following:
>
> look for JIKES=yes
> if JIKES == yes
> use jikes
> else
> look for JAVA_HOME
> if -z JAVA_HOME
> then fail
> else
> use JAVA_HOME/bin/javac
>
That is already basically what we are doing...

Testing for JIKES and if it is there, set JAVAC=jikes, if not, set
JAVAC=classic.


josh

Re: [joist-dev] Re: [helm-dev] compiler default

Author Jon Stevens <jon at latchkey dot com>
Full name Jon Stevens <jon at latchkey dot com>
Date 2000-12-14 22:43:09 PST
Message on 12/14/2000 3:49 PM, "Manoj Kasichainula" <manoj at collab dot net> wrote:

> On Thu, Dec 14, 2000 at 02:19:55PM -0800, Ed Korthof wrote:
>> i'd like to change the build-*.sh scripts so that jikes is the default
>> (if it can be found) rather than javac.
>
>> of course -- checking to see if jikes is installed is a bit of a pain --
>
>> the logic is : if JAVAC is set, use that (whatever it is). if not, and
>> if JIKES is set, use jikes. if neither of these is true, use which to
>> look for jikes in the PATH; if we find it, use jikes. otherwise, use
>> javac.
>
> This sounds like a lot of work...
>
> How about just running $SANDBOX/bin/javac, and have that be a symlink
> or script pointing to the appropriate compiler?
>
>
How is that more work than just setting an environment variable?

Actually, I would simplify the above by simply doing the following:

look for JIKES=yes
if JIKES == yes
    use jikes
else
    look for JAVA_HOME
    if -z JAVA_HOME
        then fail
    else
        use JAVA_HOME/bin/javac

-jon

--
Honk if you love peace and quiet.

Re: [helm-dev] compiler default

Author Manoj Kasichainula <manoj at collab dot net>
Full name Manoj Kasichainula <manoj at collab dot net>
Date 2000-12-14 15:49:24 PST
Message On Thu, Dec 14, 2000 at 02:19:55PM -0800, Ed Korthof wrote:
> i'd like to change the build-*.sh scripts so that jikes is the default
> (if it can be found) rather than javac.

> of course -- checking to see if jikes is installed is a bit of a pain --

> the logic is : if JAVAC is set, use that (whatever it is). if not, and
> if JIKES is set, use jikes. if neither of these is true, use which to
> look for jikes in the PATH; if we find it, use jikes. otherwise, use
> javac.

This sounds like a lot of work...

How about just running $SANDBOX/bin/javac, and have that be a symlink
or script pointing to the appropriate compiler?

Re: [helm-dev] Re: compiler default

Author dlr
Full name Daniel Rall
Date 2000-12-14 14:48:50 PST
Message Ed Korthof <edk at collab dot net> writes:

> [1 <text/plain; us-ascii (7bit)>]
> patch attached this time

+1.

Daniel

Re: compiler default

Author edk
Full name Ed Korthof
Date 2000-12-14 14:24:15 PST
Message patch attached this time

ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 650-228-2527 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
Attachments

compiler default

Author edk
Full name Ed Korthof
Date 2000-12-14 14:19:55 PST
Message i'd like to change the build-*.sh scripts so that jikes is the default
(if it can be found) rather than javac. if a user has gone to the
effort of installing jikes, it seems like we should default to using
that unless they've explicitly asked us not to.

of course -- checking to see if jikes is installed is a bit of a pain --
because not all OSes are smart enough to send error messages from which
to STDERR. (i tested that out.) the attached patch is an attempt to be
somewhat general, and make life easier for our users -- if this is
reasonable, i'll apply the same idea to joist & helm's build scripts.

the logic is : if JAVAC is set, use that (whatever it is). if not, and
if JIKES is set, use jikes. if neither of these is true, use which to
look for jikes in the PATH; if we find it, use jikes. otherwise, use
javac.

i'd guess that the clause which starts 'if test -z "${TEST}" ; then '...
is unnessary -- the output from which should always be non-empty -- but
it also doesn't seem to hurt.

as always -- comments, questions, & criticism are welcome.

thanks --

ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 650-228-2527 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
Messages per page: