For now, pulp --watch build is much slower than other custom alternatives.
Example: On halogen programs, live reloading on bundle change is up to 2 order of magnitudes slower (~100 times slower) than a custom psc-ide based watch-rebuild tool + webpack with code splitting and Hot module replacement
Today, most people coming to PureScript use pulp --watch build.
I think we could enhance drastically the developper experience by harvesting low hanging fruits.
faster --watch
I think we could we make pulp --watch build way faster.
pulp could
start purs ide
:load all modules
on *.purs change: only :rebuild the changed module
on */extern.json change: invalidate dependant modules, and recompile them
it may even be simpler if purs ide already rebuild changed dependencies, but only those.
in this case, pulp could
start purs ide
:load all modules
on *.purs change: only :rebuild the main module
faster --to
in development settings without optimisations,
pulp --to option could do one or all of those:
be concurrent with the re-building task
cache module subtrees to avoid recompilation
create splitted output (ex: vendor.js for dependencies + main.js for application)
be compatible with the pulp server so bundles are served without being written in the disk
Sounds sensible. I don't want pulp to include any dependency tracking though, the compiler takes care of that currently and I would really rather keep it that way.
For now,
pulp --watch build
is much slower than other custom alternatives.Example: On halogen programs, live reloading on bundle change is up to 2 order of magnitudes slower (~100 times slower) than a custom
psc-ide
based watch-rebuild tool + webpack with code splitting and Hot module replacementToday, most people coming to PureScript use
pulp --watch build
.I think we could enhance drastically the developper experience by harvesting low hanging fruits.
faster --watch
I think we could we make
pulp --watch build
way faster.pulp
couldpurs ide
:load
all modules*.purs
change: only:rebuild
the changed module*/extern.json
change: invalidate dependant modules, and recompile themit may even be simpler if
purs ide
already rebuild changed dependencies, but only those.in this case,
pulp
couldpurs ide
:load
all modules*.purs
change: only:rebuild
themain
modulefaster --to
in development settings without optimisations,
pulp
--to
option could do one or all of those:pulp server
so bundles are served without being written in the disk