PhpStorm seems to not allow scss file watching - node.js

I have a npm run watch job that uses node-scss to watch scss files and compile them into css files.
I use the PhpStorm IDE on Windows and when I make changes to an scss file, the file watcher (npm run watch) does not seem to recognise them. However if I open this same scss file in a Notepad, make changes, and save, the file watcher (npm run watch) recognises these changes and recompiles.
Does anyone know how to fix this issue so when I make changes to the scss file in PhpStorm the file watcher (npm run watch) will see them and recompile the css?

Please disable Use "safe write" option at Settings/Preferences | Appearance & Behavior | System Settings.
With this option enabled, IDE writes into temp file first, then deletes original file and only then renames temp into original name. Your npm run watch does not see this as file modification: it must see it differently.
When disabled IDE writes new file content directly into the file (like Notepad does) hence proper "file modified" signals getting received by your watcher.

Related

How to set RubyMine's default working directory to the executing .rb program's subdirectory?

In RubyMine, I have a project with many subfolders, each of which contains:
One or more standalone single-file executable Ruby programs (.rb files);
An input text file.
In older versions of RubyMine, when running one of the standalone executable programs (via Cmd+Shift+R on my Mac), the default folder in which RubyMine would look for the input file would be the same directory as the .rb file currently being executed -- which worked great.
The code used to read the file is something like:
data = File.readlines('input.txt')
However, after recently updating RubyMine to v2022.3.1, the behavior has changed, such that RubyMines now seems to be looking in the project's root directory for the file, instead of the same subdirectory as the .rb file currently being run. This produces the error:
in `readlines': No such file or directory # rb_sysopen - input.txt (Errno::ENOENT)
To correct this, I've been going into Run (menu) > Edit Configurations; and in the Edit Configurations dialog, in the configuration that RubyMine auto-created for the current executable file, changing the Working Directory value from the default of the project's root directory, to the subfolder of the current .rb file.
However, this above workaround is annoying, since I need to do it once each for every individual one of the many individual .rb executable files in my project.
My question: How can I configure my project and/or RubyMine itself to go back to the older behavior of defaulting a given .rb file to use its own directory as the default Working Directory, instead of the project's root directory?
(This question and/or its solution might also apply to other JetBrains IDEs such as IntelliJ, since they all seem to work similarly.)
The previous behaviour has been changed with https://youtrack.jetbrains.com/issue/RUBY-29236. So now yes, the logic is the following:
in case of no Ruby module, project's root will be used
in case of Rails, its home folder
otherwise the module's root
There is no option to change it in RubyMine but you can configure the configuration template using some variable there as Working directory.

Installshield LE is not updating the files while attempting upgrade

I've spent literally the last 5 hours around this, and can't get it to work.
I've done everything it's said in similar questions.
Change the ProductCode, keep the old UpgradeCode, Change product version.
Again and again. It doesn't replace the updated .exe file it's supposed to.
What am I missing?
Edit: I also have doublechecked the .exe build in visual studio, there it's builded and working properly. Only when I run the setup that's supposed to copy it to install folder, and only then it fails, keeping the old .exe file there, and not updating.
Does the exe on the target system have the same or higher file version than the exe you are installing? Windows installer will not overwrite a file that has a higher file version then the file it is installing.
look at the install log. search for the component name, check the Request/Action state. Is the state set to "Local"? Also search for the file name to see if msiexec tried to copy it.

Using HLint.hs file in EclipseFP

Is it possible to use HLint.hs file to customize HLint messages in EclipseFP?
I tried adding a HLint.hs file in the project root containing:
import "hint" HLint.HLint
ignore "Use camelCase"
but it has no effect:
Update:
For HLint to pick up the changes in the HLint.hs file it is required to run Cabal install dependencies by right clicking on the project:
EclipseFP runs HLint passing the project folder as the working directory, so a HLint.hs file there will be taken into account. HLint only runs when needed, so after putting the HLint.hs file or modifying it you need to touch your source files so they get rebuilt again and HLint runs on them again.

Installing Emacs Emulation keybindings -- Invalid VSIX package

I'm trying to install the extension for Visual Studio 2012 that allows emacs key-bindings.
I'm following through the steps here:
Emacs Keybindings in Visual Studio 2012 or 2013
I'm up to step 5:
Run the vsik file as administrator. This is required so the extension
can write Emacs.vsk into the program files folder. I wasn't sure the
best way to do this so I ran a command prompt as admin and then
executed start emacsemulations.vsik from the prompt.
So, running emacsemulations.vsix from an administrator command prompt,
I get the following error "This VSIX package is invalid because it does not contain the file extension.vsixmanifest at the root."
I'm not changing any of the file names inside the package.
I'm thinking this may have something to do with how windows zips up the file -- I'm able to recreate the problem simply by unzipping and rezipping the EmacsEmulation.vsix file without changing the contents of the vsix package.
If anyone has any suggestions on how to fix, or even better, the actual updated vsix file itself, I'd be very grateful!
The issue you have relies on the way you are zipping your file, what you should do is zip all files inside the folder you created (in this case, "EmacsEmulations") when you unzipped it.
Step into the EmacsEmulations folder.
Select all files.
Add to .zip
Rename the .zip output to EmacsEmulations.vsix
I'm trying to get this extension to work too, so good luck!

jd-gui stops working when I try to save all resources

I opened a jar file in jd-gui but when I try to save the all resources it stops working. I don't know where to look for the logs of jd-gui.
How can I save all the decompiled source files?
I met the same problem, and resoled it as below:
unzip the target jar file.
remove unnecessary folder
zip the remaining class files into a new-small jar file.
download the jd-cli project from here: https://github.com/kwart/jd-cli/releases/tag/jd-cli-1.2.0
use jd-cli to de-compile the jar , and with the log option, e.g.
jd-cli target.jar -od jar_result -g ALL
check the output log and find out which block.class file block the de-compile proccess. if there is, then remove it from the target.jar and then re-run the jd-cli again. You can manually copy/paste the block.class source code from jd-gui.
Open "jd-gui.cfg" with a text editor. "LastUri", in section "Decompilation", contains the name of the CLASS file causing the crash. A workaround is to open the JAR file and remove or change extension of this CLASS file.
Regards.
It seems a bug. I solved it simply trying to export sources to other folder ($home -using debian-)

Resources