Skip to content

Improve BigInteger casting behaviours - #12629

Merged
Ilya (iSazonov) merged 4 commits into
PowerShell:masterfrom
vexx32:BigIntConversions
Aug 4, 2020
Merged

Ilya (iSazonov) merged 4 commits into
PowerShell:masterfrom
vexx32:BigIntConversions

Conversation

@vexx32

@vexx32 Rain Sallow (/u/ta11ow) (vexx32) commented May 12, 2020 •

Copy link
Copy Markdown
Collaborator

PR Summary

Added a few special cases and specific casting methods for BigInteger in LanguagePrimitives' casting methods and cached conversions.

Specific conversion paths for boolean & nulls were added, and conversions added to the cache. Also, some existing conversion paths were modified to add special cases for BigInteger, which are needed because it's not IConvertible like other numeric types are.

Fixes #12623

PR Context

These changes were split from #11634 and will fix #12623.

PR Checklist

@ghost ghost assigned Ilya (iSazonov) May 12, 2020
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 12, 2020
@iSazonov Ilya (iSazonov) added this to the 7.1.0-preview.3 milestone May 12, 2020

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@vexx32 Rain Sallow (/u/ta11ow) (vexx32) May 12, 2020 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm curious as to their response, but I think it's unlikely it'll change overall. If BigInteger gets to be IConvertible, sooner or later someone's gonna come along and ask if System.Numerics.Complex should be as well, and... let's just say I'll be watching that debate from the sidelines. 😂 🍿

@vexx32
Rain Sallow (/u/ta11ow) (vexx32) force-pushed the BigIntConversions branch 2 times, most recently from 8851360 to 1ef8c98 Compare May 13, 2020 02:28
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Mainainer, Please provide feedback and/or mark it as Waiting on Author

@iSazonov

Copy link
Copy Markdown
Collaborator

Dongbo Wang (@daxian-dbw) Please review.

@iSazonov

Copy link
Copy Markdown
Collaborator

Reopen to update CIs.

@vexx32

Copy link
Copy Markdown
Collaborator Author

I probably need to rebase this... will have a look this afternoon :)

@ghost ghost added the Review - Needed The PR is being reviewed label Jul 30, 2020
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@daxian-dbw

Copy link
Copy Markdown
Member

I apologize for not being able to review this in time. There are a few other Rain Sallow (/u/ta11ow) (@vexx32)'s and Ilya (@iSazonov)'s PRs that we intended to get to but just couldn't yet ☹️ I will get to this one today.

@ghost ghost removed the Review - Needed The PR is being reviewed label Aug 3, 2020
Added a few special cases and specific casting methods for BigInteger
in LanguagePrimitives' casting methods and cached conversions.

Fixes PowerShell#12623

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with a minor comment.

Co-authored-by: Ilya <darpa@yandex.ru>

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, thanks! I appreciate your patience!

@iSazonov

Copy link
Copy Markdown
Collaborator

😺 Could add cognac labels 🍷 :

  • if PR waits one month - one start
  • if PR waits 3 months - two starts
  • and so on

@iSazonov
Ilya (iSazonov) merged commit 6aa08f9 into PowerShell:master Aug 4, 2020
@iSazonov Ilya (iSazonov) added this to the 7.1.0-preview.7 milestone Aug 4, 2020
@vexx32
Rain Sallow (/u/ta11ow) (vexx32) deleted the BigIntConversions branch August 4, 2020 13:19
@daxian-dbw

Copy link
Copy Markdown
Member

if PR waits one month - one start
if PR waits 3 months - two starts

Or use angry face 😠 instead

@iSazonov

Copy link
Copy Markdown
Collaborator

Or use angry face 😠 instead

It is already reserved for user's Issues about bugs. :-)

@TravisEz13 Travis Plunk (TravisEz13) modified the milestones: 7.1.0-preview.7, 7.1.0-preview.6 Aug 5, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

@ghost ghost mentioned this pull request Aug 17, 2020
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigInteger casting issues

6 participants