Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
naah69 opened this issue Apr 21, 2023 · 18 comments · Fixed by #41457
Closed

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

naah69 opened this issue Apr 21, 2023 · 18 comments · Fixed by #41457
Labels
area/devmode kind/enhancement New feature or request triage/needs-feedback We are waiting for feedback.
Milestone

Comments

@naah69
Copy link

naah69 commented Apr 21, 2023

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.

@naah69 naah69 added the kind/enhancement New feature or request label Apr 21, 2023
@geoand
Copy link
Contributor

geoand commented Apr 21, 2023

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
Copy link
Member

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 geoand added the triage/needs-feedback We are waiting for feedback. label Jul 14, 2023
@geoand
Copy link
Contributor

geoand commented Jul 17, 2023

Closing for lack of feedback

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2023
@vilmosnagy
Copy link

vilmosnagy commented Apr 5, 2024

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
Copy link

eastoid commented Apr 14, 2024

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
Copy link
Member

So you use devmode just for devservices and devui?

@vilmosnagy
Copy link

@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
Copy link

hntan commented Jun 14, 2024

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
Copy link
Contributor

geoand commented Jun 17, 2024

Can you elaborate on what stops functioning?

@maxandersen
Copy link
Member

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 maxandersen reopened this Jun 17, 2024
@maxandersen
Copy link
Member

@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
Copy link

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
Copy link
Member

@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
Copy link
Contributor

geoand commented Jun 20, 2024

Yeah, it does sound like a valid argument

@geoand
Copy link
Contributor

geoand commented Jun 26, 2024

Let me take a look at this one

geoand added a commit to geoand/quarkus that referenced this issue Jun 26, 2024
The interesting thing is that we essentially already had the core
functionality - it was just accessible only by pressing 'l' on the
Quarkus command line.

This change introduces quarkus.live-reload.enabled which by default
is true

Closes: quarkusio#32813
@geoand
Copy link
Contributor

geoand commented Jun 26, 2024

#41457 introduces this

@gsmet gsmet closed this as completed in 2bebd8e Jun 26, 2024
gsmet added a commit that referenced this issue Jun 26, 2024
Provide a configuration option for disabling live-reload
@quarkus-bot quarkus-bot bot added this to the 3.13 - main milestone Jun 26, 2024
@vilmosnagy
Copy link

thanks a lot for you all <3

@geoand
Copy link
Contributor

geoand commented Jul 2, 2024

🙏🏼

holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
The interesting thing is that we essentially already had the core
functionality - it was just accessible only by pressing 'l' on the
Quarkus command line.

This change introduces quarkus.live-reload.enabled which by default
is true

Closes: quarkusio#32813
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
The interesting thing is that we essentially already had the core
functionality - it was just accessible only by pressing 'l' on the
Quarkus command line.

This change introduces quarkus.live-reload.enabled which by default
is true

Closes: quarkusio#32813
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devmode kind/enhancement New feature or request triage/needs-feedback We are waiting for feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants