Just wanted to report a minor bug I've encountered while working on F4 issue. The icons pod has no types, so compiler::FPod#read fails with NPE while trying to read data from /fcode/types.def. This causes an issue in F4, but can be reproduced in a console build when build.fan sets build::BuildPod#dependsDir:
I'm trying to reproduce that problem, but can't figure it out (at least in latest code). I added a dependency on icons pod and did various things like introduce compiler errors.
It's really just a single empty class, even without compile error, and almost default build.fan with a dependency to icons pod. It compiles fine via fan build.fan, but once I specify dependsDir in build.fan, this error happens, as it seems that compiler starts using FPods instead of ReflectPods.
➜ /tmp/tmp/issue38 fan -version
Fantom Launcher
Copyright (c) 2006-2013, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0
Java Runtime:
java.version: 1.7.0_72
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vm.vendor: Oracle Corporation
java.vm.version: 24.72-b04
java.home: /Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk/Contents/Home/jre
fan.platform: macosx-x86_64
fan.version: 1.0.66
fan.env: sys::BootEnv
fan.home: /Users/ivaninozemtsev/fantom-1.0.66
➜ /tmp/tmp/issue38 cat build.fan
using build
class Build : build::BuildPod
{
new make()
{
podName = "issue38"
summary = ""
srcDirs = [`fan/`]
depends = ["sys 1.0", "icons 1.0"]
dependsDir = `/Users/ivaninozemtsev/fantom-1.0.66/lib/fan/`
}
}
➜ /tmp/tmp/issue38 fan build.fan
compile [issue38]
Compile [issue38]
FindSourceFiles [1 files]
ERR: Internal compiler error
sys::NullErr: java.lang.NullPointerException
compiler::FPod.read (FPod.fan:183)
compiler::FPodNamespace.findPod (FPodNamespace.fan:55)
compiler::CNamespace.resolvePod (CNamespace.fan:226)
compiler::ResolveDepends.resolveDepend (ResolveDepends.fan:92)
compiler::ResolveDepends.run (ResolveDepends.fan:58)
fan.sys.List.each (List.java:588)
... skipped ...
ivan Wed 7 Jan 2015
Happy new year!
Just wanted to report a minor bug I've encountered while working on F4 issue. The
icons
pod has no types, socompiler::FPod#read
fails with NPE while trying to read data from/fcode/types.def
. This causes an issue in F4, but can be reproduced in a console build when build.fan setsbuild::BuildPod#dependsDir
:brian Wed 7 Jan 2015
Hi Ivan,
I'm trying to reproduce that problem, but can't figure it out (at least in latest code). I added a dependency on icons pod and did various things like introduce compiler errors.
ivan Wed 7 Jan 2015
Hi Brian,
Thanks for looking into that. I've uploaded a sample project here – http://iinozemtsev.net/dump/issue38.zip
It's really just a single empty class, even without compile error, and almost default build.fan with a dependency to icons pod. It compiles fine via
fan build.fan
, but once I specifydependsDir
in build.fan, this error happens, as it seems that compiler starts using FPods instead of ReflectPods.brian Wed 7 Jan 2015
Thanks for reporting that. I pushed a fix.