> From: Kuiper, Arnout [mailto:[EMAIL PROTECTED] > > > Hi, > > I'm finally catching up. Here are some comments on the current > Ant principles: > > > Filenames > ========= > > I like the idea of having "/" as a directory separator, > and ":" as a path separator. This makes Ant work more predictably > in a X-platform environment. As far as the windows community > is concerned, whenever you stop using relative paths, the build file > is not portable, even between windows machines which use different > drives. But in the rare case you _want_ to be unportable, we could > use either two strategies (in my opinion): > > If we are on a windows machine && the first character is a letter && > the second character is a ":" and the third character is a "/", then > treat it as a full path. (This is the same as Duncan proposed, but > I added a check on windows, and only allow the "/"). In some cases > this might fail ("c:/foo" or "c" and "foo"). > > or > > Use the "//c/foo/bar" way, Scott proposed. I don't have that much > problems with this strategy. It lets the users think about using > full paths. Keep in mind that absolute paths should not be used, > and this should be a rare situation then. This method has no > ambiguities. > > I like the second better. >
I disagree with you on a few points. I don't see how your particular choice makes ant "work more predictably in a X-platform environment". I also don't agree that most users will necessarily want to build cross-platform build files. These are important for things like tomcat and ant itself, but a lot of users just want a build tool that they can use on their environment in a natural way. Actually absolute paths are sometimes hard to avoid. For example, when I build my JUnit test harnesses, I include the junit.jar in the build classpath. I locate that jar using an absolute path. I don't want to include the junit.jar in my project's directory area so there is no relative path available. You can take the absolute bits outside the build file and pass them in as properties but they are still absolute paths. Anyway, I find your proposals for absolute paths to be unnatural for windows users. As this is a discussion of principles I think the principles for filenames should be 1. When running on any particular platform, Ant should accept filenames expressed in the platform's normal (native) manner. Such usage may result in the build file being non cross-platform 2. Ant should support a cross platform expression of filenames for supporting cross-platform build files. All such paths would be relative paths. ':' and '/' are fine choices for purpose 2, but I think C:\foo\bar should be supported under purpose 1 on a windows machine. Is it possible to achieve both these goals on every platform? I don't know. Thoughts? Conor
