Repository navigation
Fix RestrictionsChanged Detection - #3464
Conversation
|
@matthid the impact here is : run although it will only occurs the first time after we generate a restore cache in e.g.
|
|
And if this is not a FullRestore , it will give this warning message always. |
|
@lust4life Thanks for clarifying and the fix. I'd like to see a unit test for this (I think you can copy one of mine and edit them from the PR you commented in). But in any case this looks reasonable (without me looking at the details) |
|
@matthid test added. |
|
Ok but the test didn't fail before the change, correct? I feel like a unit test might be easier to realize (assert that the settings are as they should be). The other way would be to assert that paket doesn't emit any warning? |
|
the test ( |
|
since we need compare a lock file and the origin dependencies file, mock a lock file's content (in unit test style) which seems not very robust when paket change its lock content's generate strategy. what do you think ? |
|
@matthid ping |
|
Afaik warnings don't make integration tests fail? |
|
Are you suggesting a unit test to cover this situation ?i think the difference here is how to generate a lock file : by real service (integration test) or by fake one (unit test). The problem here is not about whether the warning will cause the test to fail. It will generate inappropriate warnings. and it give tips : |
|
All I'm saying is that the test is "green" before and after the change even if it emits a warnings before and none after the change. Afaik there is nothing in place to "check" if the warning is there or not. Therefore there is no benefit in the test as it is now. Yes my suggestion would be to either change the test in a way to check if the warning was emitted and fail the test or use a unit-test instead (which I'd argue is easier because then you can "test" that the "settings object" is correct instead of testing the output) |
|
@matthid got you, fixed. |
|
@matthid ping, I don't mean to rush you, can you do a release for this pr ? since this warning message will cause our ci pipeline failed (too many log message, travis will kill the build job). or is there anything I can help ? 🙂 |
matthid
left a comment
There was a problem hiding this comment.
Looks good to me now. Thanks for going all the way :)
|
Not sure if the failing test is related, doesn't look like it. |
see details: #2638 (comment)