#1011 Fantom Pod Modularity

lbertrand Sat 6 Mar 2010

I really like the modularity built in the language and the pods - A pod that relies on a certain version of another pod declare explicitly this dependance and at run time if the version of the pod is not found, runtime error...

But I think it is not going far enough... (or perhaps I miss the obvious)

On the dev side: I cannot have the same pod in different versions in my lib directory as the name is the same... Should the pod file name be created with the podname and its version, so that we can have multiple versions of the same pod...

Example: PodB depends on PodA in version 1.0... Then new project and PodC is created but needs PodA in version 2.0 -> I cannot do that as I cannot maintain podA in v1 and PodA in v2 in my lib directory or need to create multiple workspace for each version...

This will allow a kind of build environment like Maven...

The same applies at runtime, it allows to maintain multiple version of the same pod and different pods can be link to different version of the same pod (kind of OSGi built-in)... I think this will be solved by the classloader per pod.

brian Sat 6 Mar 2010

Might want to try and go back and read some past discussions on this topic.

I personally think running multiple versions of the same pod in the same VM is a horror show. So it probably isn't something that Fantom will support out-of-the-box with the standard Envs.

However, I don't want to stop people from using Fantom that way if they desire. That is why I created the pluggable Env - so that you could run Fantom on top of things like OSGi which does support that feature (@andrey was working on that feature, not sure if he has something working with new Env design).

lbertrand Sat 6 Mar 2010

Perhaps tackling the runtime aspect is not something Fantom should directly address...

But for the dev side of it, how to work on different version of a same pod so that you can have different project using different version of it?

Is the idea to create different workspace per project, so that, you can have a version of the pod in each of the workspace? Will the type db handle this case?

brian Sat 6 Mar 2010

In general the development environment works off the runtime environment. The compiler uses the same Env infrastructure to resolve pods and figure out where to store them. So in theory if you build an OSGi Env that resolves to different versions of a pod, then the compiler will work with that Env too.

Login or Signup to reply.