:: Article Deprecated!

:: The issue mentioned in this article has been fixed in F4 v1.1.

:: Article Deprecated!

F4 Logo F4 by Xored is an awesome IDE for Fantom, I use it every day - but it does have it's quirks...

For instance, every now and again, after I've been avidly fiddling, it stops compiling. Confused? Not half as much as me!

How do I know it's stopped compiling? Because it reports no errors.

At first I notice because I've purposely broken a test, and it still passes. Or visa versa. So I type fail() in the test, just to make sure. It still passes. Annoyed, I type some utter nonsense in the editor.

Void Wheres My Error?() {
  Eh? Why is this valid?
}

No meaningful errors. No warnings. No compilation. No pod. Not a sausage. Grrr.

What's going on?

It turns out I have edited my build.fan and made a progamatic error in the resDir. It's usually something benign like a typo in one of the directory names, or forgetting to end the name in a /.

Essentially, if the build.fan causes a runtime Err then the F4 build silently fails and does not produce a .pod. (which the tests run against).

To fix it, go old skool and run the build from the command line:

C:\> fan build
compile [afWebsite]
  Compile [afWebsite]
ERR: Internal compiler error
sys::IOErr: Must use trailing slash for dir: file:/C:/afWebsite/fan
BUILD FAILED [28ms]!

Aha! The problem presents itself.

But once fixed, you then have to correct all the other errors you introduced since the initial break!

Synopsis

Symptom

F4 does not compile / report errors.

Cause

An invalid resDir (or other runtime Err) in build.fan.

Cure

Do manual build from the command line to find details of the true cause.

C:\> fan build.fan

Fix the problem.

Edits:

  • 18 Aug 2016 - Deprecated.

Discuss