malliaridis commented on PR #3358: URL: https://github.com/apache/solr/pull/3358#issuecomment-3325165592
> Why would a Solr dev change the "production" setting? _tl;dr_ The distinction between production and development artifacts is coming from the Compose gradle plugin and currently only affects the new UI / webapp. It is used for optimized builds of the new UI. _Some Background_ I believe the two build types originate from Android, where mobile apps have a debug and a release variant. The debug variant is used for faster build times and allow developers to quickly deploy code changes to devices and emulators. The release variant is normally configured to optimize the artifacts shipped to end users, so they are smaller in size and code is obfuscated to make reverse engineering harder. _ Our Case_ In our case, the development setting has quicker build times, whereas the production setting optimizes the shipped files for web-assembly (smaller in size and strict security rules in webapp). I believe there are also easy ways to attach a debugger during development, which is not possible when production artifacts are generated (obfuscated and shrinked code, stricter security rules makes it harder). The initial problem started when we integrated specific build files to the webapp and wanted to optimize build times by using development artifacts during development (so that devs don't have to wait for the code shrinking of production artifacts), and production artifacts for Solr releases. However, this had as an effect, that some tasks from the build chain related to production builds were still executed and were overwriting some other files (according to gradle) when we were using development builds (and / or vice-versa). Some of the multiplatform libraries may also not work if security rules are strict (e.g. ktor). _What we likely want_ For the webapp it is important to ship optimized files (development flag `true`) for the new UI, as the users will have longer loading times if the files are large, and also less secure webapps if the stricter rules are not applied. The distinction can also be used in future if we want to optimize other parts of our project for production or for containers for example (so that Solr distribution is minimal). But further use cases have not been explored yet. During development (development flag `true`), having fast build times, hot reloads (not available yet) and similar features are very useful, especially during UI development. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
