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

feat: Portable PDB source files list #729

Merged
merged 6 commits into from
Dec 6, 2022

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Dec 2, 2022

"Alternative 2" of #725

symbolic-debuginfo/src/ppdb.rs Outdated Show resolved Hide resolved
self.row += 1;

let document = self.ppdb.get_document(index).ok()?;
self.names[index] = document.name;
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right. I think you would have to append the name here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue here, why I was trying what I did in this original version you've reviewed, was that FileInfo required reference - it didn't own the data. PPDB get_document() on the other hand produces a String. This was incompatible and due to lifetime restrictions, there was no level in the PPDB API to produce correct FileInfo values whose lifetime could be based on 'data. Therefore, after discussing with @Swatinem, I had to refactor FileInfo (and FileEntry, although that wasn't strictly necessary in this case) to use Cow. This is a breaking change if anyone is constructing FileInfo/FileEntry directly or reads its public properties instead of getters.

symbolic-ppdb/src/format/mod.rs Outdated Show resolved Hide resolved
@vaind vaind marked this pull request as ready for review December 5, 2022 20:40
@vaind vaind requested a review from a team December 5, 2022 20:40
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #729 (903a645) into master (0b39652) will increase coverage by 0.17%.
The diff coverage is 87.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #729      +/-   ##
==========================================
+ Coverage   72.76%   72.93%   +0.17%     
==========================================
  Files          70       69       -1     
  Lines       14747    14726      -21     
==========================================
+ Hits        10731    10741      +10     
+ Misses       4016     3985      -31     

Copy link
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

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

Very nice!

symbolic-debuginfo/src/base.rs Outdated Show resolved Hide resolved
@loewenheim loewenheim merged commit 21295ef into getsentry:master Dec 6, 2022
@Swatinem
Copy link
Member

Swatinem commented Dec 6, 2022

Pls also add a changelog entry for this :-)

@loewenheim
Copy link
Contributor

My bad, forgot about that before merging

loewenheim added a commit that referenced this pull request Dec 6, 2022
Swatinem pushed a commit that referenced this pull request Dec 6, 2022
@vaind vaind deleted the feat/ppdb-source-files branch December 12, 2022 11:00
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.

None yet

4 participants