Skip to content

Fix Custom Release URL Not Working and Compilation Failure #182

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

Merged
merged 5 commits into from
May 28, 2025

Conversation

YageGeng
Copy link
Contributor

  1. Set function postgresql_archive::configuration::theseus::matcher::matcher as the default matcher​
  2. ​​Register the default matcher for the custom URL​

@YageGeng
Copy link
Contributor Author

YageGeng commented May 22, 2025

Hi @brianheineman ,​​
You can test this issue using the custom repo here: https://github.com/AtomInnoLab/postgresql-binaries. Feel free to provide any feedback or suggestions—I welcome all critiques and improvements!

Thanks in advance for your help!

@brianheineman
Copy link
Contributor

Hello @YageGeng, thank you for reporting the error and submitting a PR. As far as the implementation goes, I would prefer to see the matcher in a new module that is a sibling to the theseus and zonky modules under configuration, I largely try to avoid putting code into mod.rs. Also, in bundle.rs I think that should be refactored to avoid the need for a CUSTOM_REPO_URL LazyLock, and instead just pass an Option<&str> into fn register_github_repository(url: Option<&str>) -> Result<()>; if a url is passed in, register the matcher for it which should avoid the need for passing the url via CUSTOM_REPO_URL.

@YageGeng
Copy link
Contributor Author

Hi @brianheineman ,
Thank you for the feedback! I agree with your suggestions and will work on addressing them as soon as possible. I’ll push the updates ​​within the next few days​​.
I'll make sure to notify you as soon as the changes are ready for review. I appreciate your patience!

@YageGeng
Copy link
Contributor Author

@brianheineman Hi, I update the code. I found to register a matcher, must be a pure function.
If pass a closure, and a non-static variable is captured. the the closure will be an anonymous structure. This will cause type mismatch errors.
so. i change the SupportsFn type to support.

brianheineman
brianheineman previously approved these changes May 28, 2025
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.97%. Comparing base (39a9206) to head (f5401a0).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #182   +/-   ##
=======================================
  Coverage   98.97%   98.97%           
=======================================
  Files          71       72    +1     
  Lines        9785     9803   +18     
=======================================
+ Hits         9685     9703   +18     
  Misses        100      100           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brianheineman brianheineman merged commit 574d754 into theseus-rs:main May 28, 2025
13 of 14 checks passed
@brianheineman
Copy link
Contributor

@YageGeng thank you for the submission! I made a few changes in order to reinstate the SupportsFn type and to register the custom/theseus matchers conditionally.

@brianheineman
Copy link
Contributor

brianheineman commented May 28, 2025

@YageGeng these changes were released in 0.18.5

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.

2 participants