#373 Mercurial build missing jars

justin Tue 14 Oct 2008

It appears that when importing a build with hg, either using pull or clone, the jars are missing from /lib/java (while the dll's are still under /lib/net, and the jars are still available in the .zip download).

If using the jvm, fan will not run properly without these jars.

Is there any special way to build these jars with the latest source? Will these jars ever change with new builds (can I just copy the old ones)? Or should they be included in the repository?

brian Tue 14 Oct 2008

Justin,

You use the full build from the zip as your bootstrap build to compile the code in hg. The bootstrap (rel) build is used to build sys, compiler, and build. Then your the results of that are used to build the rest of the pods.

Refer to the Bootstrap documentation for instructions.

It is pretty tricky to get right, so let me know if you have any questions.

justin Tue 14 Oct 2008

Whew... I finally got the bootstrap build process to work correctly and all is well.

One thing that got me is that the windows substitutions are "file extension" sensitive Running the command

buildall full test

will not be recognized by the substitute checking if your Windows Substitutes are formatted like:

/C:/dev/fan/src/buildall.fan       = C:\\dev\\rel

Either remove .fan from the substitutions, or run

buildall.fan full test

Also, It is a little difficult to tell, from the Bootstrap doc, which sys.props are being edited where (fan or rel)...

brian Tue 14 Oct 2008

Justin,

Thanks for you feedback. The bootstrap compile does seem too complicated, although I'm at a loss how to simplify it since we need to use two different fan installations to run scripts.

Also, It is a little difficult to tell, from the Bootstrap doc, which sys.props are being edited where (fan or rel)...

Good point - I added a line to the Window Substitutes section.

One thing that got me is that the windows substitutions are "file extension" sensitive Running the command

I run using just buildall without the extension and it works with the extensions in the substitute list. I wonder what is different - here is my environment:

C:\dev\fan\src>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.fan;.rb

C:\dev\fan\src>assoc .fan
.fan=Fan

C:\dev\fan\src>ftype fan
fan=c:\dev\fan\bin\fan.exe "%1" %*

What does your environment look like?

katox Wed 15 Oct 2008

Bah! I've just found out another tricky part. If you run builall.fan on unix it is run by fansubstitute. That may seem fine but there is a small glitch in that approach...

I've just fixed one of the tests - and running local build.fan confirmed that that part of tests was ok. So I ran the buildall and the bug was there again! What the hell ... but wait, it is all built by fan substitute...hmmm

So I tried:

cd dev/src/flux
fan build.fan full test
clean [flux]
  Delete [/home/kato/git/fan/dev/lib/fan/flux.pod]
compile [flux]
  Compile [flux]
    FindSourceFiles [30 files]
    WritePod [/home/kato/git/fan/dev/lib/fan/flux.pod]
test [flux]
  Exec [/home/kato/git/fan/dev/bin/fant flux]

-- Run:  flux::FluxUtilTest.testOptions...
   Pass: flux::FluxUtilTest.testOptions [6]
-- Run:  flux::FluxUtilTest.testMark...
   Pass: flux::FluxUtilTest.testMark [30]
-- Run:  flux::FindInFilesTest.test...
   Pass: flux::FindInFilesTest.test [25]

Time: 463ms

***
*** All tests passed! [2 tests, 3 methods, 61 verifies] 
***

so what about fansubstitute

cd dev/src/flux
fansubstitute build.fan full test
clean [flux]
  Delete [/home/kato/git/fan/dev/lib/fan/flux.pod]
compile [flux]
  Compile [flux]
    FindSourceFiles [30 files]
    WritePod [/home/kato/git/fan/dev/lib/fan/flux.pod]
test [flux]
  Exec [/home/kato/git/fan/dev/bin/fant flux]

-- Run:  flux::FindInFilesTest.test...

TEST FAILED

gotcha. Running buildboot and buildpods instead buildall fixes the problems!

justin Wed 15 Oct 2008

What does your environment look like?

D:\dev\fan>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

D:\dev\fan>assoc .fan
.fan=Fan

D:\dev\fan>ftype fan
fan=FAN_HOME\bin\fan.exe "%1" %*

I don't have .fan in my pathext, which may be related to the extension problem. Whenever I tried to run .fan's as executables, I get an "Access Denied" dialog in Windows, so I didn't bother to use it. I just added /bin to my path and put fan in front of everything.

The Access Denied error is probably a Windows thing, so I haven't bothered to pursue it (yet).

brian Fri 17 Oct 2008

Justin,

Thanks for flagging that as an issue. For now I've updated the bootstrap doc - see changeset.

I'll also put this on my todo list to rework the launcher to be more flexible with extensions to prevent this from biting people in the future.

BTW are you running XP or Vista?

Login or Signup to reply.