--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/f91a0d17-3766-4b2e-a9e4-953682bfd967n%40googlegroups.com.
A lot of us are using Quarkus to develop web apps.But yes, if your UI is polling, you will reload things, not sure what we can do about it.As for keeping the context and avoid restarting your app if not required, you can use `quarkus.live-reload.instrumentation=true`.But reading you, I think you just want to avoid live reload altogether and just start your app in debug without using quarkus:dev.@Stuart Douglas it's not the first time I wonder if we should have a `quarkus:run` command to just start the app outside of dev mode.
--On Thu, Apr 29, 2021 at 5:23 PM Antoine D <irii...@gmail.com> wrote:Hi All,Searching in all discutions, I realise that it seems that I'm the only one to use Quarkus for a web app, because I'd like to use it instead of SpringBoot for instance.The problem: live reload and the restarts of the app.Live-reload is great... until:- you have the HMI that is polling and you want to control when the rebuild should be done: any changes in a file will triger the restart of the app- you want to do tiny modifications duing debug and be able to go back in the stack keeping the context, like Netbeans or Eclipse does.Set the password and url live-reload has no effect as I'm in localhost (i think).I'd like to use the full IDE build functionnality (Eclipse uses its personal builder, and Netbeans uses maven) to reload the class after a tiny modification like I love to do when I develop a Java application.So I created a @QuarkusMain, and starts my app with this Main class, but live-reload is still active, and it's a real nigthmare to debug (need to play with terminals + IDE + remote debug etc..)So, does anyone tried to use Quarlus as a java app that contains a server? Like you would use a Main class with SpringBoot, or Netty or Vertx ?Or Quarkus is really not done for that and I should use SpringBoot?Thans a lot for your answers!--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/f91a0d17-3766-4b2e-a9e4-953682bfd967n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_iocyMz%2BYpi-sVtnGo9AvZ7vRZYfznZ2cYv%2BahzjZ1rA%40mail.gmail.com.
Or Quarkus is really not done for that and I should use SpringBoot?Thans a lot for your answers!
On Apr 29, 2021, at 10:35 AM, Guillaume Smet <guillau...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_iocyMz%2BYpi-sVtnGo9AvZ7vRZYfznZ2cYv%2BahzjZ1rA%40mail.gmail.com.
On Thu, Apr 29, 2021 at 6:36 PM Guillaume Smet <guillau...@gmail.com> wrote:A lot of us are using Quarkus to develop web apps.But yes, if your UI is polling, you will reload things, not sure what we can do about it.As for keeping the context and avoid restarting your app if not required, you can use `quarkus.live-reload.instrumentation=true`.But reading you, I think you just want to avoid live reload altogether and just start your app in debug without using quarkus:dev.@Stuart Douglas it's not the first time I wonder if we should have a `quarkus:run` command to just start the app outside of dev mode.We have heard this before although TBH I don't really see the point as this could easily be some kind of script that builds the application and then just runs the jar, right?
@Stuart Douglas it's not the first time I wonder if we should have a `quarkus:run` command to just start the app outside of dev mode.We have heard this before although TBH I don't really see the point as this could easily be some kind of script that builds the application and then just runs the jar, right?
On Thu, Apr 29, 2021 at 11:41 AM Georgios Andrianakis <gand...@redhat.com> wrote:On Thu, Apr 29, 2021 at 6:36 PM Guillaume Smet <guillau...@gmail.com> wrote:A lot of us are using Quarkus to develop web apps.But yes, if your UI is polling, you will reload things, not sure what we can do about it.As for keeping the context and avoid restarting your app if not required, you can use `quarkus.live-reload.instrumentation=true`.But reading you, I think you just want to avoid live reload altogether and just start your app in debug without using quarkus:dev.@Stuart Douglas it's not the first time I wonder if we should have a `quarkus:run` command to just start the app outside of dev mode.We have heard this before although TBH I don't really see the point as this could easily be some kind of script that builds the application and then just runs the jar, right?Is it even possible to run Quarkus directly from a vanilla IDE? Would the IDE understand that it needs to run the quarkus plugin?
TBH I think instrumentation mode fits this use case. You want small changes to not restart, bug changes have to restart.I do think we should look at resurrecting it as the default at some point.
-Jason
On Apr 29, 2021, at 5:33 PM, Stuart Douglas <sdou...@redhat.com> wrote:On Fri, 30 Apr 2021, 2:28 am Jason Greene, <jason....@redhat.com> wrote:On Apr 29, 2021, at 11:04 AM, Guillaume Smet <guillau...@gmail.com> wrote:On Thu, Apr 29, 2021 at 5:43 PM Jason Greene <jason....@redhat.com> wrote:TBH I think instrumentation mode fits this use case. You want small changes to not restart, bug changes have to restart.I do think we should look at resurrecting it as the default at some point.It does partially address the issue but it does not really resolve the issue the OP has with polling.Instrumentation will work in some cases but not all of them and if your UI is polling every second, I can see how dev mode could be painful.One other improvement we could do (in addition to supporting pausing) is detect and ignore XHR polling (e.g look for X-Requested-With: XmlHttpRequest)That might break a lot of non polling SPA's where the interaction with quarkus is all JavaScript initiated.
On Thu, Apr 29, 2021 at 11:41 AM Georgios Andrianakis <gand...@redhat.com> wrote:On Thu, Apr 29, 2021 at 6:36 PM Guillaume Smet <guillau...@gmail.com> wrote:A lot of us are using Quarkus to develop web apps.But yes, if your UI is polling, you will reload things, not sure what we can do about it.As for keeping the context and avoid restarting your app if not required, you can use `quarkus.live-reload.instrumentation=true`.But reading you, I think you just want to avoid live reload altogether and just start your app in debug without using quarkus:dev.@Stuart Douglas it's not the first time I wonder if we should have a `quarkus:run` command to just start the app outside of dev mode.We have heard this before although TBH I don't really see the point as this could easily be some kind of script that builds the application and then just runs the jar, right?Is it even possible to run Quarkus directly from a vanilla IDE? Would the IDE understand that it needs to run the quarkus plugin?
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_iocyMz%2BYpi-sVtnGo9AvZ7vRZYfznZ2cYv%2BahzjZ1rA%40mail.gmail.com.
Here is my proposed solution to the problem.We add two new things:* ability to disable the reload on web resource access* add a /q/reload web endpoint that would trigger the reload
I agree. My main problem is to be able to disable live-coding/hot-reload to be able to use the IDE for full debug by launching the Main class with the IDE.
Live-reload
is great when you modify the schema of a class, because the app needs full
restarts, and it’s done very fast according to a IDE, so it would be great to
triger it when I need.
However, for tiny modification, Eclipse is very fast as it builds the code automatically its way. Netbeans is slower as it uses maven to replace the class at runtime but still, the context is saved.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/61255d60-739f-4080-a471-e56badcc3246n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cyf%2BkCO72bVHBgGSfeZ%2B6X12pQTPQUawp-rcTxX-Zatbg%40mail.gmail.com.
What I understood in the original question was that Antoine wanted to use the IDE to update his code while in the debugger while "keeping its context", which in my understanding means "hot reload of that class via instrumentation and not even dropping the thread's stack while in the debugger". I guess you're in a breakpoint during a request, you modify the endpoint currently being debugged and invoked, and that code is applied before the request terminates. I'm not sure debuggers can do that, I've never ever used that.
If they support that, I'm pretty sure a lot of Quarkus won't support it depending on what it does, because build steps would be interested in that change in many cases. Well, maybe not if it's not changing any signature.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9tP7tuw56KPZEmkyJ8OH67orne%3DEnGuoWCxTF-kC-g4gQ%40mail.gmail.com.
This is only for method body changes and its nice.
I use it constantly as it lets me just reload the stack frame after changing some code and
see it work with parameters and state passed in.
As it does not cover signature changes none of quarkus should care.
Somehow our instrumentation support confuses IDE's so its less clean - but if your IDE
is connected with a debugger then Quarkus shouldn't have to care for this except user need to be able to tell
Quarkus not to do the instrumentation (twice) and to not restarts...
which Stuarts PR enables.
so this should work pretty nice.
/max
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALbocOmPiVHxemuWanN4zK6d0q7-E31448Za4HVuzj5_6cmLpg%40mail.gmail.com.
/max
https://xam.dk/about
This is only for method body changes and its nice.
I use it constantly as it lets me just reload the stack frame after changing some code and
see it work with parameters and state passed in.As it does not cover signature changes none of quarkus should care.
On 6 May 2021, at 13:55, Ladislav Thon wrote:
> čt 6. 5. 2021 v 13:44 odesílatel Max Rydahl Andersen
> <mand...@redhat.com>
> napsal:
>
>> This is only for method body changes and its nice.
>>
>> I use it constantly as it lets me just reload the stack frame after
>> changing some code and
>> see it work with parameters and state passed in.
>>
>> As it does not cover signature changes none of quarkus should care.
>>
> Again, the bytecode manipulation parts of Quarkus will care. E.g. when
> we
> rewrite direct field access to getter/setter invocation, things like
> that.
aaah - I hadn't thought about that aspect. hmm...damn. I knew I would be
bit
by liking panaches public field approach :)
are there more than panache relying on such "fun" ?
On 6 May 2021, at 13:55, Ladislav Thon wrote:
> čt 6. 5. 2021 v 13:44 odesílatel Max Rydahl Andersen
> <mand...@redhat.com>
> napsal:
>
>> This is only for method body changes and its nice.
>>
>> I use it constantly as it lets me just reload the stack frame after
>> changing some code and
>> see it work with parameters and state passed in.
>>
>> As it does not cover signature changes none of quarkus should care.
>>
> Again, the bytecode manipulation parts of Quarkus will care. E.g. when
> we
> rewrite direct field access to getter/setter invocation, things like
> that.
aaah - I hadn't thought about that aspect. hmm...damn. I knew I would be
bit
by liking panaches public field approach :)
are there more than panache relying on such "fun" ?
On Thu, 6 May 2021 at 21:58, Max Rydahl Andersen <mand...@redhat.com> wrote:On 6 May 2021, at 13:55, Ladislav Thon wrote:
> čt 6. 5. 2021 v 13:44 odesílatel Max Rydahl Andersen
> <mand...@redhat.com>
> napsal:
>
>> This is only for method body changes and its nice.
>>
>> I use it constantly as it lets me just reload the stack frame after
>> changing some code and
>> see it work with parameters and state passed in.
>>
>> As it does not cover signature changes none of quarkus should care.
>>
> Again, the bytecode manipulation parts of Quarkus will care. E.g. when
> we
> rewrite direct field access to getter/setter invocation, things like
> that.
aaah - I hadn't thought about that aspect. hmm...damn. I knew I would be
bit
by liking panaches public field approach :)
are there more than panache relying on such "fun" ?Our instrumentation approach actually fixes this, as it performs the transformation before the replacement.I can make this work for IDE's as well by changing that logic to a javaagent transformer, but it means it will only work when running from quarkus:dev, not when running from the IDE as that will not run with the javaagent.
On 6 May 2021, at 13:55, Ladislav Thon wrote:
> čt 6. 5. 2021 v 13:44 odesílatel Max Rydahl Andersen
> <mand...@redhat.com>
> napsal:
>
>> This is only for method body changes and its nice.
>>
>> I use it constantly as it lets me just reload the stack frame after
>> changing some code and
>> see it work with parameters and state passed in.
>>
>> As it does not cover signature changes none of quarkus should care.
>>
> Again, the bytecode manipulation parts of Quarkus will care. E.g. when
> we
> rewrite direct field access to getter/setter invocation, things like
> that.
aaah - I hadn't thought about that aspect. hmm...damn. I knew I would be
bit
by liking panaches public field approach :)
are there more than panache relying on such "fun" ?
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/A32BBB11-400D-4C6A-AA1B-D7FD46E07225%40redhat.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/985adbf0-507a-4ebe-b555-2670e5da9140n%40googlegroups.com.