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

Remove description implementation for std::error::Error #6555

Closed
christophermaier opened this issue May 14, 2019 · 2 comments · Fixed by #6949
Closed

Remove description implementation for std::error::Error #6555

christophermaier opened this issue May 14, 2019 · 2 comments · Fixed by #6949
Labels
Focus: CLI Related to the Habitat CLI (core/hab) component Focus:Exporter Focus:Launcher Related to the Habitat Launcher (core/hab-launcher) component Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Type: Chore Issues for general code and infrastructure maintenance Type:Technical Debt No functional changes; just about cleaning up and reorganizing

Comments

@christophermaier
Copy link
Contributor

The description function for the std::error::Error trait has been "soft-deprecated".

Historically, this implementation has always been a bit "noisy" in our codebase, since it largely duplicates the Display trait implementation for our error types.

The docs say that we no longer need to implement description, and should favor implementing Display on new types. Since we already do the latter, we should now to the former and remove all description implementations in all the crates of this repository.

@christophermaier christophermaier added A-supervisor Focus:Exporter Type:Technical Debt No functional changes; just about cleaning up and reorganizing labels May 14, 2019
This was referenced May 14, 2019
christophermaier added a commit that referenced this issue May 14, 2019
See #6555 instead.

Signed-off-by: Christopher Maier <cmaier@chef.io>
christophermaier added a commit that referenced this issue May 15, 2019
See #6555 instead.

Signed-off-by: Christopher Maier <cmaier@chef.io>
christophermaier added a commit that referenced this issue May 17, 2019
See #6555 instead.

Signed-off-by: Christopher Maier <cmaier@chef.io>
@menoude
Copy link

menoude commented May 21, 2019

Hi,
I'm looking for a first contribution to a project, do you only need to remove the method implementation everywhere or is there a need for some replacement? If it's the former, I can try to handle that :)

@christophermaier
Copy link
Contributor Author

@menoude Yes, this is just about removing the current method implementations; we don't need anything to replace them.

(Rather, it should be just about removing the current code... I don't think we're explicitly using the description method ourselves, and have only implemented it to conform to the then-current definition of the Error trait. If you get into it and find otherwise, let's chat 😅 )

Thanks for your interest in Habitat; we're very glad to have you around!

@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Focus:Launcher Related to the Habitat Launcher (core/hab-launcher) component Focus: CLI Related to the Habitat CLI (core/hab) component Type: Chore Issues for general code and infrastructure maintenance and removed A-supervisor labels Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus: CLI Related to the Habitat CLI (core/hab) component Focus:Exporter Focus:Launcher Related to the Habitat Launcher (core/hab-launcher) component Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Type: Chore Issues for general code and infrastructure maintenance Type:Technical Debt No functional changes; just about cleaning up and reorganizing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants