Login | Register
SlimerDude 1 Aug 2012
Is it possible to use F4 with the PathEnv so that the built pods are put in a different place to the compiler?
Jens 1 Aug 2012
I've wanted to do the same thing when fiddling around with the Fantom compiler. I use the embedded installation as the rel installation, and want the output pod in a separate dev installation.
SlimerDude 2 Aug 2012
F4 -> Help -> About -> Installation Details -> Configuration shows
F4 -> Help -> About -> Installation Details -> Configuration
so using util::PathEnv directly looks out of the question.
ivan 2 Aug 2012
The F4 itself runs on EquinoxEnv, but we have full control where to put compiled pods and it is possible to override environment variables of processes launched from F4.
I think we will solve this issue out of the box in F4 1.0.2 (should be released after two weeks), but the manual workaround is already available with current version of F4:
outPodDir := `../../mydev/lib/fan/`
SlimerDude 4 Aug 2012
Yeahokay... I guess that kinda works, except for transitive dependencies aren't picked up from the work lib dir (and it's a bit messy having to specify config for each project and launcher!)
Ooo! Oh! Ooo! A new shiny F4! The cat's out of the bag now, how exciting! What updates / features can we look forward too?
SlimerDude 3½ days ago
Thought I'd try this again...
By hook or by crook, has anyone managed to make F4 import pods from any location other than the interpreter install?
F4 1.0.2 builds pods into the project's bin folder, which is nice. Run launchers can specify a FAN_ENV, which is fine. Referenced projects that are open are automatically added to your build path, which is great!
But the one thing I can't seem to do is make F4 reference a pod from outside the interpreter / fantom install dir. For instance, when you close a referenced project, or try to reference a pod from your FAN_ENV work dir.
I've tried making a fake interpreter library from my work dir and adding that to the project, but eclipse will only allow 1 interpreter library. :(
I've tried symlinking / junctioning an inner dir from the fantom install lib/fan dir, but nested dirs aren't scanned for pods.
Other than keeping ALL my projects open in F4 ALL the time (I'd rather not!), I'm not sure how else to accomplish this.
ivan 2½ days ago
At first let me please illustrate a problem as I understand it.
Suppose there are two projects in workspace: lib and app. Both of them put their code into lib/bin/fan/bin/fan and everything works fine. But if we close lib project, then app project stops compiling and launching.
My usual workflow is to have projects I need to modify are open in workspace and the rest of projects just deployed to Fantom installation library (usually logical projects consist of more than one project in terms of IDE, so I typically have something like buildAll.fan to build all projects for production use).
Another simple manual solution might be to symlink compiled pods directly into Fantom lib folder, like this:
$ ln -s myworkspace/myproject/bin/fan/lib/fan/myproject.pod $FAN_HOME/lib/fan
Regarding changes in F4, right now I don't have idea what is the best approach for this could be. Ability to add additional Fantom installations either on project or global level seems to be obvious idea, but still it might be required to configure at which installation I wish my pod to be put when I change a project.
Another idea might be to switch to repositories, so that F4 always uses a hidden internal installation and all pods must be either come from workspace projects, or downloaded from Fantom repositories.
SlimerDude 2 days ago
Ah, I've not tried symlinking the actual .pod file yet!
All the directory issues above stem from using PathEnv (see docLang::Env#PathEnv) whereby specifying extra directories (via the FAN_ENV_PATH environment variable) mean fantom will use those extra dirs when looking up pods and files.
My last post was because currently, F4 only looks in the interpreter installation folder for .pod files, and I would like it to also scan optional extra folders - such as the PathEnv dirs.
My ideas (in increasing order of correctness) are:
I don't think using fanr repositories are the way forward, as fantom itself doesn't use them for compilation. To avoid confusion, everything F4 does should mimic what the standard fantom build does.
I don't mind where F4 currently builds the pod in bin/fan/lib, for I can do a cmd line build when I want it built into a different dir. (Though specifying an output folder, similar to Java builds, would probably be best all round solution.)
@Ivan: Just in case you think I'm not appreciative, thanks for doing a blinding job on F4! It's only because I use it on a daily basis that I want to tweak it!
ivan 2 days ago
Thank you for a positive feedback :) I wish I have more time to work on F4, there's a lot of things I'd like to improve.
By the way, F4 already uses output folder from Java project settings (but it appends its path with fan/lib/fan), therefore outDir from build.fan can be set to whatever suits the best for command line builds.
What I also think might work is to create a new project type like Fantom library – basically just a project with folders lib/fan for pods and etc for configs. So it would be possible to just drop binary pods into a library and configure projects to put pods inside it. And even if project is closed, last compiled version still will be available in library project.
Nice idea Ivan, but either the other .pods aren't being picked up, or they're not exported.
Login or Register to Reply
Back | All Topics
Collapse All Expand All