#2845 More than one build scripts in the same directory?

CretinHo Thu 17 Jun 2021

Seems not supported. I have two build scripts: buildx.fan to build pod and build.fan to build jar.

When I run: fan buildx.fan it failed with this error:

compile [test]

Compile [test]
  FindSourceFiles [3 files]

/home/test/Downloads/test/buildx.fan(3,1): Duplicate type name 'Build' BUILD FAILED [10ms]!

Move build.fan to somewhere else solved the problem.

So if it's not supported to have more than one build scripts per directory please update the docs to explicitly state so.


CretinHo Thu 17 Jun 2021

Sorry. It was my mistake. The error told it very clear. Both buildx.fan and build.fan have the class name as Build so the type Build is duplicated. Replace it with another name solved the problem. So there is no issue having more than one build scripts per directory!

Login or Signup to reply.