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

Reload scripts #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Reload scripts #40

wants to merge 1 commit into from

Conversation

KostyaSha
Copy link
Member

@KostyaSha KostyaSha commented Oct 4, 2016

@KostyaSha
Copy link
Member Author

cc findbugsman @oleg-nenashev

@jglick
Copy link
Member

jglick commented Oct 31, 2016

You forgot to use a permalink (Y button in GitHub).

@jglick
Copy link
Member

jglick commented Oct 31, 2016

Sounds like it would solve the issue (whatever that is exactly). This will have effect on more than just that, though. For example, people trying to test the effect of using resURL will no longer be able to. I think it is not a big deal.

@KostyaSha
Copy link
Member Author

Seems groovy reload doesn't work without it.

But i not sure, sometimes resources doesn't reload after changes at all...

@jglick
Copy link
Member

jglick commented Dec 16, 2016

Rather than completely turning off caching, which makes interacting with Jenkins in hpi:run mode painfully slow, I would like to see Jenkins actually check file timestamps and invalidate its cache intelligently.

@KostyaSha
Copy link
Member Author

Even with this arg changed groovy scripts i.e. in config-detail.groovy in OptionalJobProperty doesn't reload. They reload while there is error and then somewhere cached.

@jglick do you have any idea what else to check?

@oleg-nenashev
Copy link
Member

Just to respond to the ping in Skype from @KostyaSha. I ignore mentions which I find insulting.

@KostyaSha
Copy link
Member Author

KostyaSha commented Dec 27, 2016

So,
https://github.com/stapler/stapler/blob/7065a603a6dde83f015bd8d600e1692673d37edb/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/GroovierJellyScript.java#L41-L50
Loads groovy file from target/classes/$class/some.groovy when it available. When i delete it, it picks groovy file from src/main/resources as expected.

@KostyaSha
Copy link
Member Author

KostyaSha commented Dec 27, 2016

Then https://github.com/stapler/stapler/blob/7065a603a6dde83f015bd8d600e1692673d37edb/core/src/main/java/org/kohsuke/stapler/lang/KlassNavigator.java#L154 returns groovy from target even if URLClassLoader contains src/main/resources first in list.

@KostyaSha
Copy link
Member Author

Maybe IDEA messing classloaders?

@jglick
Copy link
Member

jglick commented Jan 6, 2017

returns groovy from target even if URLClassLoader contains src/main/resources first in list

Sounds like it may be a bug in Stapler. Note that the order would not matter if your IDE automatically copies files from src/main/resources/ to target/classes/ after modification, as I think NetBeans at least does.

Best to check behavior first without an IDE (using mvn compile to test propagation of changes).

@KostyaSha
Copy link
Member Author

if your IDE automatically copies files from src/main/resources/ to target/classes/ after modification

Is it default NetBeans behaviour or you jenkins-plugin?

@jglick
Copy link
Member

jglick commented Sep 26, 2017

Default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants