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

oids sticks to 24 length strings; fixes breaking changes #20546

Merged
merged 1 commit into from
Oct 12, 2022
Merged

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Oct 11, 2022

ref ringabout#26

follow up #20338

fixes breaking changes. (though cast[int32] may work better)

@ringabout ringabout changed the title oids sticks 24 length strings oids sticks to 24 length strings Oct 11, 2022
@ringabout ringabout changed the title oids sticks to 24 length strings oids sticks to 24 length strings; fixes breaking changes Oct 11, 2022
@Araq
Copy link
Member

Araq commented Oct 11, 2022

Seems worse to me. What's wrong with making it produce longer strings?

@ringabout
Copy link
Member Author

If users have stored the string form of Oid in the database, they cannot parse Oid from strings anymore using new version Nim as it is.

@Araq
Copy link
Member

Araq commented Oct 12, 2022

Fair enough but what does that imply for the "time is about to overflow" problem?

@ringabout
Copy link
Member Author

ringabout commented Oct 12, 2022

It should still work as good as cast[int32](getTime().toUnix) #20338 (comment)

I have tried switching to year 2038 and this change can pass tests too.

@ringabout ringabout self-assigned this Oct 12, 2022
@Araq Araq merged commit 13b3ea7 into devel Oct 12, 2022
@Araq Araq deleted the pr_oids branch October 12, 2022 13:15
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 13b3ea7

Hint: mm: orc; opt: speed; options: -d:release
162718 lines; 8.078s; 614.555MiB peakmem

capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
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