You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/04/24 03:50:32 UTC

[GitHub] [incubator-teaclave-sgx-sdk] tatetian opened a new issue #229: Derive Debug trait for SGX types

tatetian opened a new issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229


   ### Background
   
   When debugging, one usually needs to inspect the value of an object. For exactly this purpose, Rust offers the ability to implementing or automatically deriving Debug traits for user-defined types. Rust programmers have taken this godsend feature for granted.
   
   ### Problem
   
   However, the SGX-related types defined in sgx_types crate do not have Debug trait implemented or derived. This makes it really cumbersome to debug values of SGX types. This absence of Debug trait for basic types also deviates the practice in Rust std crate, where (almost) all types support Debug traits. Moreover, due to Rust's the orphan rule, it is impossible for the users of Rust SGX SDK to manually implement Debug trait for SGX types defined in sgx_types crate.
   
   ### Feature Request
   
   For the reasons above, I hope that Debug trait to be implemented (most can be derived automatically) for all SGX types defined in sgx_types. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] tatetian commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
tatetian commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-620024717


   Thanks for the quick coding! The commit looks good.
   
   I got a question: why the implementation for Debug trait needs to be feature gated? I suppose that it is useful enough to be always enabled.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] volcano0dr commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
volcano0dr commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-619985914


   It's OK.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] tatetian commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
tatetian commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-618808334


   I believe Debug is only implemented for `[T: n]`, where n <= 32. So, yes, some types need manual implementation for Debug trait.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-619476122


   @volcano0dr how do you think about it? https://github.com/apache/incubator-teaclave-sgx-sdk/commit/3c1edf464a6353f14fd0f665a1206494bea6c5a6


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-618797839


   i remember last time i failed on large arrays. just created a new branch to continue ...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave-sgx-sdk] dingelish commented on issue #229: Derive Debug trait for SGX types

Posted by GitBox <gi...@apache.org>.
dingelish commented on issue #229:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/229#issuecomment-619463625


   check https://github.com/apache/incubator-teaclave-sgx-sdk/commit/3c1edf464a6353f14fd0f665a1206494bea6c5a6


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org