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

Deprecate toBools in Bits (should be asBools) #2143

Closed
mwachs5 opened this issue Oct 4, 2021 · 4 comments
Closed

Deprecate toBools in Bits (should be asBools) #2143

mwachs5 opened this issue Oct 4, 2021 · 4 comments
Assignees
Labels
good first issue An issue whose fix is simple. Perfect for a new developer wanting to get involved!

Comments

@mwachs5
Copy link
Contributor

mwachs5 commented Oct 4, 2021

See discussion in #2124 (comment)

Type of issue:feature request | documentation | other enhancement

Impact: API modification

Development Phase: proposal

Other information

If the current behavior is a bug, please provide the steps to reproduce the problem:

What is the current behavior?

There still exists a .toBools function, undeprecated, in Bits.scala

What is the expected behavior?

All the .toBools were deprecated and turned into asBools. This one seems to have been forgotten? Or was that intentional?

Please tell us about your environment:

What is the use case for changing the behavior?

consistent function names leading to less cognitive load on users

@mwachs5 mwachs5 added the good first issue An issue whose fix is simple. Perfect for a new developer wanting to get involved! label Oct 4, 2021
@sequencer sequencer self-assigned this Oct 7, 2021
@sequencer
Copy link
Member

sequencer commented Oct 11, 2021

I just notice this:

314:  final def toBools: Seq[Bool] = macro SourceInfoTransform.noArg
317:  final def toBools(dummy: Int*): Seq[Bool] = macro SourceInfoWhiteboxTransform.noArgDummy

121635e didn't deprecate toBools, but deprecated do_toBools, so I just removed do_toBools, but didn't remove toBools.

If user from 3.4 used toBools, they will receive a runtime deprecation warning, rather than a normal deprecation warning, (and this may break binary compatibility? @jackkoenig)

So currently, in the master code, toBools will introduce which will throw do_toBools not implemented, so I propose remove toBools directly in Chisel 3.5, since runtime deprecation warning has already warned users.

@debs-sifive
Copy link
Contributor

@ibukenya nobody is working on this ticket yet, if you want to give it a try!

@mwachs5
Copy link
Contributor Author

mwachs5 commented Oct 19, 2021

@debs-sifive , @ibukenya I think that @sequencer was working on this (and realized it was a little complicated, need to add to import Chisel._. #2170

@jackkoenig
Copy link
Contributor

This was removed in v3.5.0, fixed by #2170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue whose fix is simple. Perfect for a new developer wanting to get involved!
Projects
None yet
Development

No branches or pull requests

4 participants