quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

provide the config to disable reload class in dev mode #32813

Closed naah69 closed 3 months ago

naah69 commented 1 year ago

Description

it always enabled reload class in dev mode whatever activate profile. we always find some problems that is about quarkus dev classloader and quarkus dev restart classloader. for example: some class in project was loaded in quarkus dev restart classloader,but the framework use quarkus dev classloader to load class,then it error with ClassNotFound.

Implementation ideas

envirement vairable or buildtime config to disable reload class.

geoand commented 1 year ago

I think it t would be more helpful if you provide an example of how you use Quarkus that causes problems to your development experience.

maxandersen commented 1 year ago

You can press 'l' to pause livereload. Does that help you?

You can also use quarkus run if you just want to run.

But yes I agree with @geoand that it would be great to hear what is actually failing for you so we can fix the underlying issue rather than globally disable reload.

geoand commented 1 year ago

Closing for lack of feedback

vilmosnagy commented 6 months ago

You can press 'l' to pause livereload. Does that help you?

@maxandersen @geoand nope, it does not. Could you please reopen this issue?

I use Vaadin with Quarkus, and every time I change something in my files, the whole UI & the whole state just resets. I don't wanna play with it, I just wanna disable the whole live-reload thingy. It's a small project at the current moment, and it's more pain in the ass to remember not to change my files than the rebuild - which takes ~1 sec.

Pressing l every time my app starts is a painful way to do this. I wanna config this once, and never care about disabling it ever in the future.

eastoid commented 6 months ago

same issue. from what i see, there isnt a direct way to get rid of the development features without manually working with build commands.

maxandersen commented 6 months ago

So you use devmode just for devservices and devui?

vilmosnagy commented 6 months ago

@maxandersen i just want to get rid of devmode. it's just a proof of concept app at the moment, the compile time is seconds, and I want to build features not debug Vaadin to solve the live-reload functionality.

hntan commented 4 months ago

Really, you guys closed the ticket? The reload class feature is causing some inconvenience for me at the moment. It seems I need to rerun the application even for minor changes like adding comments or switching branches as the application stop functioning.

geoand commented 4 months ago

Can you elaborate on what stops functioning?

maxandersen commented 4 months ago

If the ask is to get rid of devmode then the solution is simple: don't use devmode. Just use Quarkus run or whatever traditional way you want to build.

But I don't think that's what is asked - users want devmode for devservices and devui but disable reload because various usecases does not work very well with it.

Now we got one such example: vaadin. And this usecase is similar to how we've recently enabled in webbundler that css/image/J's/html changes don't cause hot restart.

Not sure if vaadin could ever be able to avoid restart so in this case having option to turn it off makes sense to me.

Still would really like to know of examples where it fails. As otherwise we or those fwks can't Improve.

maxandersen commented 4 months ago

@hntan can you explain why you run devmode if you don't want changes to work ? Ie. Just run the app instead of using devmode ? (It might be obvious - but let's make it explicit)

vilmosnagy commented 4 months ago

If the ask is to get rid of devmode then the solution is simple: don't use devmode. Just use Quarkus run or whatever traditional way you want to build.

@maxandersen is there an easy way to turn off devmode if I want to start my app with a main method from Jetbrains IDEA in debug mode? I searched, but did not find any. I don't want to give up neither the easy start from the jetbrains IDE, nor the debugging session.

It would be fine for me to turn off the whole devmode if I can still run the app from my IDE.

maxandersen commented 4 months ago

@vilmosnagy ah! launching from IDE via running main method - that's an important context! and yeah that currently assumes you want devmode.

The way to avoid it is to run using mvn quarkus:run for example.

Let me see if there is a way to avoid it - I fear there is not (at least currently).

geoand commented 4 months ago

Yeah, it does sound like a valid argument

geoand commented 3 months ago

Let me take a look at this one

geoand commented 3 months ago

41457 introduces this

vilmosnagy commented 3 months ago

thanks a lot for you all <3

geoand commented 3 months ago

🙏🏼