-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
[2.1.0] Up-to-date checks are worse than before #38
Comments
This is my bad, I have a cold that just refuses to go away so I haven't yet looked at all the changes for If you're comfortable with Gradle it'd be great help if you could look at the Yarn section of the repository and validate it! |
Well, the inputs and outputs of the As for tests - couldn't you just copy this test from the P.S. Get well first, the release can wait a bit more! :) |
I improved the up-to-date checking in the When upgrading the plugin in the Java project where I use it, I realized that the tasks where very often executed again whereas they should be considered as up-to-date. Since the Could you confirm that your up-to-date detection issues are related to the environment (using the
Gradle will compile the plugin code and use it instead of the plugin downloaded in the repository. |
@bsautel - I'm seeing the following as an example:
As for the second point about trying |
This confirms the fact that the issue regarding the Yes, you do not have to change the plugin declaration. You just have to include the build in the |
@bsautel - yes, your changes seem to work. My |
There's a 2.1.1 available now wit the improvements. But in regards to Though I'm kinda curious, is there something apart from the |
Yes. We use Ember.js and one of the plugins for its build system modifies a file. I’ve opened an issue but I don’t think they’ll fox it. So some kind of option to ignore certain files/directories would be nice as otherwise in my case the ‘yarn’ task will rebuild every time.
|
I'm not sure I understand what you mean @boris-petrov . In which task does this happen? The The Angular build uses some cache files in the
But this works only for a custom task, not for the According to which task causes a |
And thanks @deepy for the |
Not the yarn task itself but another one which runs the build system is the one that modifies a file. This happens every time (that’s the way it is written), so the next time I run again the build system (which depends on the ‘yarn’ task) - the ‘yarn’ task is rerun. So that’s why an option for the ‘yarn’ task to ignore certain files would be useful...
|
Ok, I see what you mean. The I don't know exactly how Gradle behaves when the output changes. I believe that Gradle does not run the task again when the content of an output directory changes but it does if the directory no longer exists. But I am not sure of that, so I did a little test:
I don't know exactly why you encounter this problem but, unless I did an error, this does not seem to come from the |
@bsautel - thanks for the support! I am seeing this when I run gradle with |
Indeed, I was not lucky in my attempt to reproduce it. The task is considered as out-of-date when a file inside the output directory is modified or deleted but not when a file is added. It explains why I don't have the same issue with the Angular build that adds some files in the Modifying the I don't see any way to fix this issue without modifying the plugin. To fix (we should rather tell workaround) this issue, you would need to be able to configure the task output. Probably we should use a file tree instead of a directory on which we can add some exclude rules and add a configuration closure that would configure it? Note that you would have the same issue with the And you reported this issue as a regression in the 2.1.0 version. The one regarding the environment is fixed in the 2.1.1 version which is now released. But can you confirm you already had this issue (regarding the modified files in the |
Yes, that sounds reasonable.
Yes, the issue in 2.1.0 is resolved and perhaps now it works the same way as on 2.0.0. I can't confirm exactly because it never was consistent... but it definitely did rerun the task when I've made no changes to Thanks a bunch! |
Thanks @boris-petrov for your explanations. @deepy, what do you think about this solution to fix the issue? |
@bsautel the solution being adding a way to provide an exclude for It sounds good to me, especially if the convention for many tools is treating |
Yes, I was speaking about adding a way to exclude some paths from the default I don't think that it is a convention, I would rather say that this is an exception. But in this case, we don't have any solution to do that correctly. I will fix it soon for the |
…nd YarnInstallTask output files (by default it is the whole node_modules directory).
@boris-petrov, I pushed a commit that should help you fix your issue. yarn {
nodeModulesOutputFilter = { it.exclude("bootstrap-sass/assets/stylesheets/_bootstrap.scss") }
} We can write exactly the same thing for the Is it good for you? @deepy, are you okay with that? Is the naming satisfying? |
@bsautel - looks perfect, thank you for the great support! |
@bsautel it's a mouthful but I can't think of a better name :-) |
After updating to
2.1.0
, pretty much every time theyarnSetup
andyarn
tasks are run. On2.0.0
that wasn't the case. I see in the changelog that some work was done on that... but can you revisit it please? Can I help in some way?The text was updated successfully, but these errors were encountered: