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

Migrate Record to ValueCastable, from UserValue #529

Merged
merged 5 commits into from Nov 6, 2020

Conversation

awygle
Copy link
Contributor

@awygle awygle commented Nov 6, 2020

This PR migrates Record from being based on UserValue to being based on ValueCastable, clearing the way to deprecate UserValue.

Would close #528 .

@codecov
Copy link

codecov bot commented Nov 6, 2020

Codecov Report

Merging #529 into master will decrease coverage by 0.07%.
The diff coverage is 69.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
- Coverage   81.39%   81.32%   -0.08%     
==========================================
  Files          49       49              
  Lines        6440     6457      +17     
  Branches     1286     1288       +2     
==========================================
+ Hits         5242     5251       +9     
- Misses       1009     1015       +6     
- Partials      189      191       +2     
Impacted Files Coverage Δ
nmigen/hdl/rec.py 92.73% <69.56%> (-4.18%) ⬇️
nmigen/build/run.py 22.05% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06c7349...febbc90. Read the comment docs.

nmigen/hdl/rec.py Outdated Show resolved Hide resolved
nmigen/hdl/rec.py Outdated Show resolved Hide resolved
nmigen/hdl/rec.py Outdated Show resolved Hide resolved
nmigen/hdl/rec.py Show resolved Hide resolved
nmigen/hdl/rec.py Outdated Show resolved Hide resolved
nmigen/hdl/rec.py Outdated Show resolved Hide resolved
awygle and others added 3 commits November 5, 2020 16:58
Co-authored-by: whitequark <whitequark@whitequark.org>
Also remove comment referring to Record as a Value
@whitequark
Copy link
Member

Oh, a good addition to this PR would be to rip out every place where Record is treated somehow differently in the middle end and back end. (I don't think we have any in the front end.)

@awygle
Copy link
Contributor Author

awygle commented Nov 6, 2020

I don't actually see any of those? A grep -R Record nmigen/ shows Record being used in a few places but I only see things of the form isinstance(x, Record) or similar in the RPC server and the compat layer, both of which I'd consider to be special cases.

@whitequark
Copy link
Member

I don't actually see any of those?

Oh right! We already ripped those out after we migrated it to UserValue.

@whitequark whitequark merged commit abbebf8 into amaranth-lang:master Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Redesign Record to be based on ValueCastable
2 participants