Trouble Replicating the Build
Trouble Replicating the Build
I am unsure if this is the best place to ask this, if there is a better place please let me know.
I'm having some trouble replicating the build process, and it appears to have to do specifically with the minimization process. I am able to replicate the non-minimized files exactly, but the minimized versions always have differences.
The build process described on the github (https://github.com/DataTables/DataTablesSrc) does not name any particular version of Closure to use, but none that I have tried yield an exact replica of the minimized versions found on the compiled repo.
The primary differences seem small: the variables are named differently, there is a slight optimization difference in a series of boolean statements, or there is a difference in information in the header comment. I can't imagine, functionally, the code has changed, but I can't help but think there is a step being missed in build process somewhere.
I have also attached a diff to show these differences.
Some information:
- I am only compiling the javascript, using the 'js' option of the make script, and only comparing the base dataTables build with no extensions.
- I am using version 1.10.19 of the source (and the same version of the compiled to compare).
- I am only using Bash and Closure to do this. I do not have PHP, Sass, or JSHint (presumably not needed as I am only compiling the javascript).
- I have used both the OpenJDK and Oracle to run Closure
- A coworker also performed this build process, and was able to replicate the same minimized file I had but not the minimized version on the compiled-sources github.
- I am using an online javascript pretty-printer to allow comparison between the minimized files to be readable. (https://beautifier.io/)
This question has an accepted answers - jump to answer
Answers
Hi,
This is the version information about the closure compiler version that the current release of DataTables was built with:
Its an old one as I found it gives better compression than the newer ones with no side effects that I've seen or have been reported. That said, the next version will use a newer one as we move on to using a rebuildable VM for development.
I assume its just for validation that the minified version is actually the minified version of the source file that you want them to be identical?
Allan
Thank you very much, Allan, as usual!
This endeavor has been for the sake of validation, and we were able to reproduce the build using that version of closure. Is there any chance we could get that closure version information on the github readme? Or maybe the release notes? That would be fantastic.
Again, thank you very much.