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

Added Encode/Decode traits (and new_element helper) #48

Closed

Conversation

ryankurte
Copy link
Collaborator

Traits for encoding and decoding of SVD objects <-> XML Elements towards #46.
@Emilgardis I think this should be compatible with your approach to error handling?

@Emilgardis
Copy link
Member

Yes it should work fine, however I don't see the point in this pr. I think adding everything together makes more sense.

I can redo my work on error-handling, that's fine.

@ryankurte
Copy link
Collaborator Author

I'd much rather split the work into smaller chunks because imo it's easier to work on bit by bit (in the time I have available), to share work, and to reasonably review each set of changes.

I'm also afraid of ending up in the same situation as #37 where PRs stall and because of the size of the changes rebasing is basically impossible / completely manual.

I could have a go at updating #37 but it basically involves manually reapplying any changes since then and the diffs are so huge it's nearly impossible to observe any regression.

src/types.rs Outdated
type Object;
/// Parsing error
type Error;
/// Parse an XML/SVD element into an SVD Object.
Copy link
Member

Choose a reason for hiding this comment

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

Sentence doesn't feel right to me. Maybe

[...] into it's corresponding Object

src/types.rs Outdated
pub trait Encode {
/// Encoding error
type Error;
/// Encode an SVD object into an XML element
Copy link
Member

Choose a reason for hiding this comment

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

Same here as above. Maybe just skip "an SVD object".

src/types.rs Outdated
pub trait Parse {
/// Object returned by parse method
type Object;
/// Parsing error
type Error;
/// Parse an XML/SVD element into an SVD Object.
/// Parse an XML/SVD element into it's corresponding Object.
Copy link
Member

Choose a reason for hiding this comment

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

Object refers to the trait type, put into code block. i.e `Object`

@Emilgardis
Copy link
Member

Emilgardis commented Mar 9, 2018

I still feel uneasy about merging this without anything related to it. Maybe it would actually be easier to open a refactor branch and just directly push to it and then merge it when finished, as you first suggested.

We could have discussions over on irc or another suitable "forum"

@ryankurte
Copy link
Collaborator Author

ryankurte commented Mar 9, 2018 via email

@Emilgardis
Copy link
Member

Emilgardis commented Mar 10, 2018

I say yes to implementing this on some objects, but no to opening dependent PRs. If we are going to make multiple small PRs depending on this I think skipping the PR system until it is complete is the best choice.

@ryankurte
Copy link
Collaborator Author

Closed in favour of upstream/refactor

@ryankurte ryankurte closed this Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants