Symfony manifest asset versioning creates multiple files - manifest

I'm using Symfony (v4.1) for one of my projects.
As I wanted to try out the manifest versioning I enabled it on dev environment. I'm pretty sure it's not a good practice as it takes more time to build the assets up, but well... curiosity.
I realized that while using manifest versioning I'm building up the new asset every time I change something, which is correct, but it seems like the old asset is not being removed.
I'm not sure if it's a desired behavior, but is there any way to remove the old file by configuring the Symfony's Encore? Or am I not understanding this correctly and the old file is still needed for something?

No old files are not needed. There is the 'cleanup-webpack-plugin' you can enable by using:
Encore
.cleanupOutputBeforeBuild()

Related

Google Services Gradle Plugin not generating resources from json

Problem started suddenly and seems to be not related to any change that happened in code around its first occurance.
We have automated CI workflow that prepares RC.
At first every second build worked. Now I had to rebuild RC 7 times to get app that is not crashing.
After investigating it is clear that there are no config values in resources, ergo plugin is not generating values from json config file. Basically rebuilding same code many times makes it work, at some point.
We had recently changed dependency injection in app from dagger components to hilt, it might be the reason of some kind of race or shared resources during build time.
It is also problematic to work around. I've prepared resource files with all values in order to manually add them in build process instead of generating with plugin. Now, because we also use crashlytics, I cannot remove google services plugin as crashlytics is checking for google services tasks in gradle. I cannot remove unused json file as plugin will crash because of lack of config file. Plugin also (based on docs https://developers.google.com/android/guides/google-services-plugin) adds some dependencies to main module, but I wasn't able to find anything in :app:dependencies so maybe docs are outdated.
I am not able to provide any project for reproduction as it only happens in commercial project. I understand it makes the problem hard to resolve in such case but maybe other people has it also.
AGP: 7.2.0-beta02
Google Services plugin: 4.3.10
Hilt: 2.41
EDIT:
I've resolved symptoms by creating gradle module for each build type we have, and each module contains only res/values.xml which I've copied from app/build/generated/res/google-services/*. This way required keys are always available in resources, as we do not often (hardly ever) change json file with config. I am still trying to investigate builds with --scan option but I cannot reproduce it with scan, it only happens without it.

Is it right to use GIT for version control of HTML pages

I am working on an app that creates automatic blog HTML pages using JSON and also has to provide versioning for that blog.
Creating HTML using JSON files
Creating a GIT tag whenever User creates a version.
If the user wanted to see the previous version of that blog I am simply checking out that file to given tag and fetch the file and again creating HTML using that JSON file.
Questions
Is it right to use GIT for the above purpose?
If yes, Are there any precautions that I have to take?
If no, Is there any alternatives for saving the previous version of a file except saving each file for each version?
Note: I am using Node.js for creating GIT tags and checkout to tags
You should use git for every project, ask if it's right only if you have a ton of binary files.
I've seen people use git for content writing and articles, remember it is an efficient version control systems and as long as you wish to have past versions of your project( you always should), you should use git.
even if you are not pushing to a remote repository, it's better to have some VCS implemented in all your projects.

disable simultaneous tags editing in PHPStorm for one project

With latest phpStorm 9 we have new feature called simultaneous tags editing.
This is generally very nice feature that i'd like to use, but i have one old project with very bad code with a lot of mixed PHP, HTML and JS code, where it breaks code.
I know i can disable this in settings->editor->General->simultaneous tag editing, but it disables this feature for whole phpStorm. Is there way to disable it only per one project?
Is there way to disable it only per one project?
Nope -- this is an IDE-wide setting.
The only possible solution I can think of is to have separate PhpStorm installation that will use custom folders to store IDE settings (look into idea.properties file from PhpStorm distribution, e.g. on Windows 7 it would typically be %PhpStorm-Install-Folder%\bin\idea.properties).
With IDE settings stored in different location you can now configure this installation with different settings (e.g. have that option turned off). Obviously, all settings here will be different to your original setup, unless you configure it the same way or will keep certain config files synced (e.g. Keymaps, Color, Web Servers, Live Templates and other things could easily be synced on file level).
Just remember to launch this installation when you want to work with that specific project.

adding files to all platforms of a cocos2d-x project

This is a very basic question, but I have not been able to find the answer anywhere.
I just got Cocos 2Dx 3.3, made a new project and built the HelloWorld scene that was generated.
It generated projects for all platforms, but I am currently compiling and running the Mac project using XCode.
I can easily add new files using XCode, but of course it only adds it to my XCode Project. I would have expected a way to automatically modify all projects at once to add files or change compiler settings. I saw that there is a CMake file, probably used for command line compilation, but I cannot find a way to use that to regenerate the projects for all platforms.
Is it possible to automatically add a file to all platforms? Maybe it is possible to modify the template directory os Cocos and use the cocos new command line to recreate the project from scratch?
Or is it better to do all that manually?
Such an automation would imply parsing of a project file, finding list of relevant files and then changing all the dozen of project files. Which is hell of the work.
Even if it was implemented, how would this implementation decide which project file is a main one? (to get filelist from) And if your projects all have different lists of files? This would need merging etc. etc.
For now cocos new only copies files from one place to another. Frankly, Cocos2d-x have much more serious problems to solve, so I don't think this feature will ever be implemented.
However, you could customize project files/folders to your needs to make process of adding files more or less convenient and sometimes even automatic. Here are some clues:
It is easy to change Android and Linux Makefiles so they will pick up all the source files from a specified folder. Just use wildcards. Resource files are picked up by default.
For Visual Studio solutions (Win32, Win8, WinPhone) you could enable "Show all files" to see all files that either added or not. Unfortunately you can only see files down in the folder tree relative to project folder. To see Classes folder, make a symlink (link /j) of a Classes folder near .vcxproj file. You'd better don't copy/move project folder after it. And don't forget to add this linked folder to ignore list of your versioning system, or you will end up with duplicated files. Resource files are picked up by default for Windows projects.
I am not aware of any solution for XCode project, so you basically stuck with manual source file addition. Which is most annoying among all platforms. However it can pick up resource folders with all files.
Anyway, I would be glad if someone would proof me wrong and would write some kind of script to solve this problem (and also to change project name, company id, automatic versioning, etc.). I believe it could be done more or less reliably with, let's say Python and some regex magic. At least until project file formats will change.

WIX InstallUtil/InstallUtilLib and Configuration File Deployment why is InstallUtil bad?

I often find the quote "InstallUtil.exe" is an ugly pattern or "Don't use InstallUtil.exe" and that I should use native WIX or Installation package patterns and I still don't understood why.
I stepped away from using InstallUtil to install a .NET service as I finally learnt that writing registry keys for such an action should be an un-install-able action - and I've come to terms with this as correct.
As I've been working through my WIX installer for a relatively complex product, I have found myself in need of creating or updating SQL Server databases, creating or updating IIS Applications and finally updating or creating configuration files.
Each of my components (features) are optional, but they all share the same configuration file. As my product uses unity, its important to note that this library contains strong support for reading/updating/removing components from the Unity Configuration block, therefore it seems fairly smart to me that I should take advantages of these blocks via Installation Components (i.e. InstallUtil) to create or update my configuration file at installation time.
Just to be clear here, my installer does not natively contain a configuration file for my application: at installation time, the installer has no idea as to the shape of it as its based on the features selected. Surely I should be embedding this knowledge into each of the modules that are to be deployed and not in the remit of the installer which is now a completely independent project? Wouldn't this break O-O principals even if we are talking about installation?
I'd really appreciate some guidance as to whether this is good practise or not? Am I reading 'InstallUtil' is bad for installing services, or is it that using 'InstallUtil' is bad full-stop? If so, what are my options for smart updating of configuration files?
The main reason for avoiding InstallUtil is that it runs outside of the installation transaction, so Windows Installer cannot keep track of what it's done.
I have used InstallUtil on a few occasions, when I just couldn't get Wix to do what I needed and didn't have time to write a custom action. In this case I called the InstallUtilLib version as I feel this is a cleaner approach.
I used the this blog as a guide as to how to achieve this.