question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pinned versions compete at different scopes

See original GitHub issue

In #863, I reported an issue where stable of black didn’t work as expected. That issue is biting me again today.

Somewhere in a cryptic cache, pre-commit has cached that stable is something other than what Github has as stable for the same repo. Is there any way to tell what commit pre-commit has associated with stable?

The recommendation is to “just use autoupdate”. However, that recommendation requires committing the updated version to the current project’s repo, irrespective of what version that project might be using in the test suite or what version of black may be installed in the development environment.

Moreover, because autoupdate writes to a SCM-managed file, running that command alters the state of the environment, demanding additional manual steps (config), and diverging that file from its previous state. For example, I manage this pre-commit config that’s shared across hundreds of projects, so if black needs updating, I need to update it in that root repository before merging it with the hundred projects.

I’d like to find a way to eliminate the toil and noise of keeping pinned versions updated across hundreds of projects.

I’d rather there be a way to specify “latest” for each of the plugins and while pre-commit should continue to cache those values for performance, there should be a way to say, “please check” and ideally that could happen periodically (~daily or weekly) for a given repo.

Maybe the best thing to do for now is to just rm -r ~/.cache/pre-commit each time I get divergent results from what black produces from other updated sources?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Dec 30, 2020
0reactions
jaracocommented, Dec 30, 2020

in case you missed it above – you might want to check out pre-commit.ci – it has a periodic autoupdater so you don’t have to think about it

I’ll check that out, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permission scopes - Slack API
OAuth allows app to dynamically request access tokens, imbued with optional permission scopes. Token types. Read up on the different types of access...
Read more >
App manifest schema for Teams - Microsoft Learn
Static tabs declared in personal scope are always pinned to the app's personal experience. Static tabs declared in the team scope are currently...
Read more >
Pin, Unpin, and why Rust needs them - The Cloudflare Blog
Pin exists to solve a very specific problem: self-referential datatypes, i.e. data structures which have pointers into themselves. For example, ...
Read more >
Pin the minor version of Security Products (tools and ... - GitLab
Problem to solve Updating every instances in the world at once each time we release a new version of our Security...
Read more >
Pin and suffering - fasterthanli.me
Well, the async version isn't that hard either. Try out tokio for example. ... One function blocks the executor, another doesn't, why?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found