Vaadin: How do I get rid of vite? - vaadin

The description of "Vite" was tempting and I was stupid enough to enable this new feature. Since then I am stuck with endless UI recompile loops! I.e. each time after I logged into my application the frontend gets recompiled AGAIN and the application restarts. ||-(
Disabling Vite in the lower right control-dialog is not accepted, it remains activated. How do I get rid of this unbaked feature again?
This is using Vaadin 23.1.7 and Java 17.

In Vaadin 23.1 you can remove the feature flag by deleting it from src/main/resources/vaadin-featureflags.properties.
Note that Vaadin 23.2 uses Vite by default. If you want to continue using Webpack going forward, you need to instead add this feature flag to the properties file:
com.vaadin.experimental.webpackForFrontendBuild=true

Related

How to stop browserlink.js and aspnet-core-browser-refresh

Why do I have all this junk in my console, only when using VS 2022?
I set Options -> Projects and Solutions -> ASP.NET Core -> Auto build and refresh options -> NONE
And also disabled 'browser link' here:
None of that stuff appears when running the same project in VS 2019, and I'm pretty sure its messing with my SignalR connections
For anyone using dotnet cli tool and want to disable the hot reload and console output whatever, and have no luck with dotnet watch --no-hot-reload, try put this at the very start of your js script:
function removeDotnetHotReload() {
const scriptInjectedSentinel = '_dotnet_watch_ws_injected'
// #ts-ignore
window[scriptInjectedSentinel] = true
}
removeDotnetHotReload()
For aspnet-core-browser-refresh, can you please file an issue at https://github.com/dotnet/sdk, as that's where that code lives?
For Browser Link, I can tell you that right now there's no way to disable those messages in a .NET 6 app without turning off CSS Hot Reload as well (you can turn verbose messages off in the console so they won't show, but they'll still be emitted). If you are ok turning off CSS Hot Reload, you can do that in Tools->Options->Projects and Solutions->ASP.NET Core. Please file feedback at Developer Community about this as well so we can potentially make this more discoverable.
That said, I'm curious why you think this might be interfering with your SignalR connections. If there is interference there, we definitely want to address that as well, but I'm not sure off the top of my head why that would be.
Per https://developercommunity.visualstudio.com/t/Browser-Link-cannot-be-disabled/1582653#T-N1608441, adding "hotReloadEnabled": false to your launchSettings.json profile(s) should suppress the injection of these scripts by Visual Studio. This does not actually turn off C# hot reloading - just turns off the scripts that MSFT injects.

Today suddenly: Java live reload unavailable

I had been happily using Java live reload while debugging my Vaadin application over the past few months.
Today, after I started my browser and directed it to my locally running Vaadin application I got a popup in the lower right corner stating:
Java live reload unavailable. Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow. Read more
Clicking onto the read more link (pointing to 'https://vaadin.com/docs/v14/flow/workflow/workflow-overview') just brings me to a "404 Page Not Found" error page.
So - two or actually three questions:
what could cause my live-reload functionality go missing? I am using MS Edge and the Live-reload plugin is enabled (and it used to work until yesterday).
where has the page gone explaining how to set that up?
and finally: Any idea, what to check or fix to get this working again? I consider that pretty essential functionality for efficient UI development!
For question 2, you can find the documentation here: https://vaadin.com/docs/v14/guide/live-reload

Can Chromium features that are normally turned on via switches be turned on programatically after starting up?

Is there a way to use Chromium switches after starting it up, or must they be enabled on start up? For example, can switches be passed to the renderer processes, or just to the main process?
I want to turn on paint flashing in Chromium (actually in my Electron app which runs on top of Chromium).
Devtools has a checkbox that turns this on, but I want to be able to turn this on without devtools, and after the app has started.
I know there's a show-paint-rects flag I can use:
chrome.exe --show-paint-rects
In my Electron app, I would need to use app.commandLine.appendSwitch:
app.commandLine.appendSwitch("show-paint-rects");
I also found a ui-show-paint-rects flag that lives in something called the "compositor," but that may be irrelevant for me.
Both of these work, but since Chromium uses a multi-process architecture, I'm hoping that there's a way I can specify that switch, or otherwise, turn on a feature in one process and not have to specify it at startup.
Is there a way to do this in Chromium? (Would be ideal to do this in Electron, but I'm not counting on it)

Installshield 2014 Basic MSI Hide features dynamically not installing features

I have created a Basic MSI Installer using InstallShield 2014 for a server/client program and have to hide features dynamically based on the License Key of a database that is installed prior to our Server app being installed. I have created conditions for the features that need to be hidden, setting the InstallLevel to 0 if they are not licensed and 1 if they are licensed. I am getting the license key after the SQL Login dialog (because the installer wouldn't know what database to look in otherwise) but conditions are evaluated during the CostFinalize action, which runs before the dialogs are created. So after I get the license key and run some other custom actions to determine the availability of each feature, I call the CostFinalize action before the CustomSetup dialog is shown.
I am getting the correct behavior for the features that need to be shown, and you can select or deselect said features in the dialog, however, when the installation executes, the selected feature is not installed....and the log file says that the feature is not selected for install, even though the user clearly selects it. Why would this be happening? Is there another approach to hiding features dynamically (I have tried the FeatureSetData function in an InstallScript action, but to no avail)?
Also, after I added the conditions to the features, whenever I try to uninstall the program from the Programs and Features app, I get an Error 1606 Could not access network location. It's like the registry key gets messed up when there are conditions on the features...Any help would be greatly appreciated.
I found the problem...If you set the features InstallLevel to 0 to start with and have a condition that sets it to something greater than zero, then it will not install the feature, regardless of whether it's selected. If you invert this logic and start with the features InstallLevel set to 1 and have a condition that changes the installlevel to 0, it will hide or show the feature AND it will be installed properly. This also caused the error 1606 I was getting on the uninstall...
Also, if anyone ever has components that get installed that aren't supposed to be installed, then you might try switching the Dependency Checking to none. For some reason, the .NET dependency check that InstallShield does causes certain components to install all the time, even if their assigned feature is turned off. Hope this helps someone in the future.
The CostFinalize can also be run by a dialog to refresh the feature list. Here are the steps:
In the Next PushButton of the SetupType Dialog, create a new item at the top.
Event: DoAction
Argument: CostFinalize
Condition: 1=1
In my case, I was hiding a feature based on a previous dialog and needed it to reevaluate conditions in the Program Feature.
Condition: Level:0 GLOBAL_VAR=0
Condition: Level:1 GLOBAL_VAR=1

Is Start (Dart framework) autoreload on the server side?

Is start (Dart server side framework) auto-refresh when one of our source code changed (just like PHP)?
Is bulls_eye, bloodless and express too?
or if they are not, is there any Dart server side framework that able to do that (edit code, then test on the browser, without needing to restart the dart/server program)?
Currently this is not yet possible in Dart. If you change the code you have to restart the app.
I wouldn't expect this to work anytime soon.
A main feature to make this possible is to manipulate the code at runtime. This is planned but as far as I know not yet started.
EDIT
The above mentioned feature is necessary when you want code to be updated without loosing the current state of the application but that is usually not so important on the server because it should be (mostly) stateless anyway.
In Dart there's no need to restart the server app when only the client part changes.
If you really just want to restart the entire server when the code changes you should be able to do that by yourself. Create a console app that loads the server app into an isolate (spawnUri) and watch the source directory for file changes. In the case of a file change shutdown the server-app-isolate and create a new one.

Resources