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

624 bypass caching #1023

Merged
merged 7 commits into from
Aug 11, 2022
Merged

624 bypass caching #1023

merged 7 commits into from
Aug 11, 2022

Conversation

mximp
Copy link
Contributor

@mximp mximp commented Aug 10, 2022

@mximp
Copy link
Contributor Author

mximp commented Aug 10, 2022

@yegor256 please merge

* Fallback which can swap primary/secondary repos.
* @since 1.0
*/
public static final class FallbackSwapOy implements Objectionary {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp I think it would be better to make it an outside class, like all others that start with Oy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 The reason I made it nested is that it's quite specific implementation of Oy tightly bound to PullMojo. For now there is only one use case for this - Oy build strategy for PullMojo.
Wrapping this logic into class simplifies testing of it and usage, but I don't see a reason to make it standalone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp all other Oy classes are only used by PullMojo. This one is no different.

@yegor256
Copy link
Member

@mximp it's hard to understand the logic, since the puzzle was not about swapping, but about cleaning the cache. would be nice to have some explanation of the idea in the Javadoc of this new Oy* class

@mximp
Copy link
Contributor Author

mximp commented Aug 10, 2022

@yegor256 I've added some docs. Please check if the idea is more clear now.

During compilation the plugin will download required objects from
[Objectionary home](https://github.com/objectionary/home) and cache them.

Caching may be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mximp this doesn't seem accurate. This option (full name is --update-snapshots) forces Maven to download latest versions of snapshot dependencies from Internet and cache in ~/.m2. Thus, caching is not disable, but its update is enforced. In our case, we should do the same: keep the cache in ~/.eo but make sure that even if an .eo file exists locally, we still download it and cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 True - corrected

@yegor256
Copy link
Member

@mximp see above

@mximp
Copy link
Contributor Author

mximp commented Aug 10, 2022

@yegor256 please check now.

  • extracted oy
  • updated docs

@mximp
Copy link
Contributor Author

mximp commented Aug 11, 2022

@yegor256 reminder, please check

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Aug 11, 2022

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 67ebcd9 into objectionary:master Aug 11, 2022
@rultor
Copy link
Contributor

rultor commented Aug 11, 2022

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 8min)

@mximp mximp deleted the 624-bypass-caching branch August 11, 2022 09:38
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.

None yet

3 participants