Writing this up as a continuation of https://github.com/elm-lang/elm-package/issues/168#issuecomment-257701205
TLDR; If elm-make supported JavaScript configuration files or leveraged environmental variables then I would be able to dynamically set the sourceDirectories to symlink farms that our internal build system generates. Onto the issue. I work at a large company with a very old (but effective and scale-able) build system. Without getting into too much detail, it is basically a wrapper around other build systems that gives developers the tools to generate the right environments before calling underlying build systems. For example, in the case of Java, we use our internal build system to wrap something like ant. The internal build system will generate the classpath based on our internal package management/repository system (just contains git repos) which is responsible for pull down packages and managing them in a local package cache. So, we do something like this: $ build <target> And under the hood, it will do something like this $ CLASSPATH=... ant <target> You can think of its package cache as an elm-stuff for any build system that is associated with a workspace, not associated with a single package. This is a very dumbed down case. There is a lot more going on in terms of the environment, but in and of itself, ant has no way of knowing how we distribute our packages to developers for building, and we can't upload our internal source code to something like GitHub. I've done a lot of work on integrating non-elm JS into our build system and in all cases I depended upon features like $NODE_PATH and Webpack's resolveRoot/resolveAlias features. Using those, I'm able to use our internal tools to generate what should be the include path for JavaScript sources. In the end, that path is composed of symlink farms and build artifact directories of other internal JavaScript packages. We also have an internal build fleet that uses these tools and this is how we deploy code (one of the ways at least). Now, we can talk about better ways to handle distributing sources, but the fact of the matter is that we have a lot of infrastructure and tooling that depends on interoperability with our build system, and when tools can't integrate easily then they become hard to adopt. If elm-make supported an elm-package.js file that could execute JavaScript code, then I would be able to leverage environmental variables to set the "sourceDirectories" dynamically. Likewise, if it leveraged its environment or took options in as a command line option then I would be able to set it; similar to how webpak configuration can be passed in via the command line. This feature would depend on the other stuff that was mentioned in the GitHub issue link: the ability to specify packages that are not hosted on the public elm repository but are instead somewhere on the local file system. We can talk about other solutions within elm, but dynamic configuration files and environmental variables seem to be pretty common in other build systems so I figured I would start there. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
