Skip to content

Conversation

@ccoVeille
Copy link
Contributor

@ccoVeille ccoVeille commented Nov 3, 2025

Description

I'm the owner of https://github.com/ccoVeille/go-safecast

I noticed your CI was broken because of my recent changes to add deprecation warning to some methods.

Note: I made some slight changes, as I update the returned value in the v2 of my lib

So I added check on the error to use zero as a fall back to replicate what would do the v1.

Working on your PR helped me to figure things, such as there is a real need for me to support uintptr

See

stdInFd, err := safecast.ToInt(uint(os.Stdin.Fd()))

Testing

Launched golangci-lint locally.

Please note, I checked that the gosec issue false positive is still there.

References

Related #573: fix the issue with linting reporting go-safecast deprecation warning of ToInt

Related to

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@ccoVeille

This comment was marked as outdated.

@ccoVeille

This comment was marked as outdated.

@ccoVeille

This comment was marked as outdated.

@ccoVeille

This comment was marked as outdated.

authzedbot added a commit to authzed/cla that referenced this pull request Nov 3, 2025
@tstirrat15
Copy link
Contributor

Thank you for putting this up! We've already put through a couple of update PRs in our other repos - I like the API changes, and it only broke CI because we're pretty aggressive about deprecation warnings. It would have thrown at some point or another.

And yeah I don't mind having a manual workaround for uintptr - the particular functionality is a weird edge case in the golang stdlib and I don't feel like your lib needs to handle it if it'd be too far out of the normal codepath.

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.68%. Comparing base (7ed5ab0) to head (069dfe9).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
internal/cmd/validate.go 33.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #574      +/-   ##
==========================================
+ Coverage   39.28%   41.68%   +2.40%     
==========================================
  Files          37       37              
  Lines        5448     4764     -684     
==========================================
- Hits         2140     1986     -154     
+ Misses       3063     2519     -544     
- Partials      245      259      +14     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

I have read the CLA Document and I hereby sign the CLA
@ccoVeille ccoVeille changed the title build(deps): bump github.com/ccoveille/go-safecast to 1.8.1 build(deps): bump github.com/ccoveille/go-safecast to v2.0.0 Nov 4, 2025
@ccoVeille
Copy link
Contributor Author

ccoVeille commented Nov 4, 2025

I have updated the PR now I have published the v2 of my lib

https://github.com/ccoVeille/go-safecast/releases/tag/v2.0.0

It natively supports uintptr so I removed the int conversion, my lib now handles it

Copy link
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

Thank you for putting this through!

@tstirrat15 tstirrat15 merged commit 62ee04a into authzed:main Nov 4, 2025
17 of 19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2025
@ccoVeille ccoVeille deleted the build-deps branch November 4, 2025 20:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants