Skip to content

Conversation

@Sukuna0007Abhi
Copy link
Contributor

@Sukuna0007Abhi Sukuna0007Abhi commented Sep 4, 2025

Fixes: #1065

Fix incorrect file reference in mop.r.n.yaml hints section

Problem

The mop.r.n.yaml file contains an incorrect file reference in its hints section that points to a non-existent file path:

Solution

it should point to Zicfiss,

hints:

  - { $ref: inst/Zicfiss/ssrdp.yaml# }  # Correct path fixed
  • Also added validation check , Method: Udb::Instruction#validate
  • Tests each $ref by dereferencing it
  • Prevents future broken hint references

Ready for Review sir @ThinkOpenly sir @dhower-qc

>>
>> ssrdp instruction is in Zicfiss directory, not Zicfilp.
>>
>> - Fix: inst/Zicfilp/ssrdp.yaml# → inst/Zicfiss/ssrdp.yaml#

Signed-off-by: Sukuna0007Abhi <[email protected]>
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.05%. Comparing base (914b672) to head (bf502af).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1066   +/-   ##
=======================================
  Coverage   46.05%   46.05%           
=======================================
  Files          11       11           
  Lines        4942     4942           
  Branches     1345     1345           
=======================================
  Hits         2276     2276           
  Misses       2666     2666           
Flag Coverage Δ
idlc 46.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@dhower-qc
Copy link
Collaborator

Thanks for fixing.

If you are up to it, it would be great to add a validation check to catch this in the future.

An instruction-specific validation would be in tools/ruby-gems/udb/lib/udb/obj/instruction.rb, Udb::Instruction#validate. You can test a ref by trying to dereference it. Something like:

# don't take this literally; it probably belongs in a loop
hint_inst = ref(@data["hints"][0])

If you put it here, it will be covered by CI checks.

If you are really ambitious, you could also try to validate all refs by walking the database and dereferencing everything ref you find.

@Sukuna0007Abhi
Copy link
Contributor Author

Sukuna0007Abhi commented Sep 4, 2025

Sure sir @dhower-qc, I will do this, Thanks for suggesting

Add validation to Udb::Instruction#validate method to check all hint
 entries by dereferencing them. This catches broken hint references
early in the validation pipeline and provides clear error messages
showing the specific instruction and hint index that failed.

The validation runs as part of existing CI checks and will prevent
future broken hint references from being introduced.

Addresses mentor feedback on adding ref validation to catch issues like
the recent inst/Zicfilp/ssrdp.yaml# -> inst/Zicfiss/ssrdp.yaml# fix.

Signed-off-by: Sukuna0007Abhi <[email protected]>
@Sukuna0007Abhi
Copy link
Contributor Author

If you are really ambitious, you could also try to validate all refs by walking the database and dereferencing everything ref you find.

Yes sir I will create another PR which will validate all refs and resolves this type errors for not showing anymore in future

@Sukuna0007Abhi
Copy link
Contributor Author

Ready for Review sir @ThinkOpenly sir @dhower-qc

@ThinkOpenly
Copy link
Collaborator

I'm still learning Ruby, but it looks good to me. Did you test it, @Sukuna0007Abhi ? (Did it find any other issues?)

@Sukuna0007Abhi
Copy link
Contributor Author

Sukuna0007Abhi commented Sep 4, 2025

I'm still learning Ruby, but it looks good to me. Did you test it, @Sukuna0007Abhi ? (Did it find any other issues?)

Yes sir @ThinkOpenly I tested it and this issue find when working on PR #1064 and there are some other refs errors for which I will create another PR which automatically fix all the refs as sir @dhower-qc said

Copy link
Collaborator

@ThinkOpenly ThinkOpenly left a comment

Choose a reason for hiding this comment

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

there are some other refs errors

Great! This little piece of code has already proven its value!

@Sukuna0007Abhi
Copy link
Contributor Author

Sukuna0007Abhi commented Sep 4, 2025

Thanks sir @ThinkOpenly 🙏 but pls check my message it's need very much help for me 😞

@ThinkOpenly
Copy link
Collaborator

there are some other refs errors for which I will create another PR

I presume we should get that PR merged before this one, to prevent validation errors?

@Sukuna0007Abhi
Copy link
Contributor Author

Sukuna0007Abhi commented Sep 4, 2025

there are some other refs errors for which I will create another PR

I presume we should get that PR merged before this one, to prevent validation errors?

Actually sir that's same like this but for all files refs in entire database. This PR is ok for this file I think And it's actually needed merged for #1064

@Sukuna0007Abhi
Copy link
Contributor Author

Sukuna0007Abhi commented Sep 4, 2025

Thanks sir @ThinkOpenly 🙏 but pls check my message it's need very much help for me 😞

And sir @ThinkOpenly sorry for disturb I actually talking about different message on different platform, needs kind help there also 🙏

Copy link
Collaborator

@dhower-qc dhower-qc left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@dhower-qc dhower-qc added this pull request to the merge queue Sep 5, 2025
Merged via the queue into riscv-software-src:main with commit b5d25b9 Sep 5, 2025
47 checks passed
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.

Incorrect file reference in mop.r.n.yaml hints section

3 participants