montagejs / mop

Montage Optimizer (mop): Minifies (to reduce file size) and creates bundles (to reduce the number of requests) of Montage applications.
Other
31 stars 15 forks source link

Refuse to mop already mopped application #42

Open Stuk opened 11 years ago

kriskowal commented 11 years ago

After read and hash?

Stuk commented 11 years ago

I mean, if you run mop in builds/myapp@abcdef it should not.

There's also an optimization to detect if there's been no updates to the app, and so avoid running mop again, which I think is what you understood. (Would also be great to do this for deps as well, and only rebuild packages that have changed, and copy other ones across)

kriskowal commented 11 years ago

@stuk, I see. I agree. We need to abort loudly if someone tries to build using build products as input (though I’m academically curious whether mop is as idempotent in practice as it is in theory). We will track that here.

As for minimizing effort, reusing already built libraries will be a more interesting problem. The dependencies are linked against the particular build, so there might be some inconvenient issues with relative build locations, particularly with the relative build location of the parent package vs peers. Will have to think that through.

Mop was of course designed for incremental deployment with shared, eternally cached dependencies, but it no longer supports that feature (because it was a pain to maintain two deployment strategies). It would be worth revisiting that strategy in the future, particularly if we can copy loader pages into the root of the builds directory, so that it would serve as a document root for the most recent build.

kriskowal commented 10 years ago

Assigning to @stuk to get this out of limbo. Not urgent, in my opinion.