-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build instructions in README produce different bundles compared with prebid.org downloads #8458
Comments
chipping in on this one. we had an instance recently, where, apparently the "Global" can be set in the source build version but this is not available in the website download version, having this added to the website download version would be good, as i always build from the website, as i belive if its there its def working etc ( just my crazy logic) |
This might be related to #7935 @dbirkbeck did it start with 6.17 or 6.0 |
@patmmccann, yes it appears to have started in 6.17.0. The 6.16.0 build matches as expected but 6.17.0 does not. Is there anything that can be done to sync prebid.org and local builds up? (It makes troubleshooting issues very difficult when builds don't match up.) |
it is possible the build date is included in the download page, investigating. |
To be clear, I'm not worried about the build date comment at the top of the build being different (such as the following). /* prebid.js v5.20.4 It is understood that these comment dates will be different based on when the build was done. I'm more concerned that the prebid.org and locally built code itself is different. |
@dbirkbeck how are you comparing - are you removing the leading comment, then comparing checksums? Or any other steps to reproduce? |
@dgirardi, yes I am removing the leading comment and then comparing using diff, checksums, and file sizes. Again, I am only concerned about the code itself being different. Having prebid.org generated code not match local builds makes troubleshooting extremely difficult. |
@dbirkbeck you should be able to reproduce the exact bundle (minus the leading comment) by doing
the differences you see with the second are due to how the build can optimize away more code from unused modules (optimization was improved in 6.17). The website, for performance reasons, builds everything at once and generates bundles by concatenation (using an equivalent of You should also see a small decrease in size if you use |
Thank you @dgirardi. Great explanation. I am now able to reproduce the prebid.org build locally and they match. (At least for 6.17.0 anyway.) I'l try my best to summarize my concern. While I do appreciate the small decrease in build size, usually it is best to have a single consistent version of code being produced whether downloading from prebid.org or building locally. As an example, say a particular browser works with one version and not the other. It could lead to a great deal of time being spent troubleshooting the wrong version. I don't have any great suggestions for improvements other than perhaps updating the build documentation at https://github.com/prebid/Prebid.js to include your |
@dbirkbeck I agree with noting this in the build docs - I'll keep this issue open to track that. I am less certain about making the "default" build match the website - probably because I am not familiar with your workflow and use case. My expectation is that people who go through the trouble of running their own build (either from source or npm) are doing it mostly to optimize code size. @patmmccann do you have an opinion on this - if you follow the build instructions in the README, should you get something identical to what you get from prebid.org, or something marginally better? As an aside, we could consider a larger goal of generating optimized bundles from the website as well. |
My belief is that people will prefer the build size improvement. |
Type of issue
Request/question
Description
When building Prebid 5.x or lower I was able to directly compare the result with builds downloaded from prebid.org. (They matched) As of Prebid 6.x, builds no longer match. Can someone provide more detail on the build environment used for prebid.org so I can update by local build environment to match?
Steps to reproduce
This is not a bug but to reproduce, locally build any version of Prebid 6.x and then compare it to the same version downloaded from prebid.org.
Test page
Expected results
I should be able to directly compare locally built versions with versions downloaded from prebid.org.
Actual results
Platform details
node 14.18.1
npm 6.14.15
Other information
The text was updated successfully, but these errors were encountered: