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

EMPTY_BYTE_ARRAY in client impl will cause compilation error #3006

Closed
XiaofeiCao opened this issue Jan 3, 2025 · 2 comments · Fixed by microsoft/typespec#5510
Closed

EMPTY_BYTE_ARRAY in client impl will cause compilation error #3006

XiaofeiCao opened this issue Jan 3, 2025 · 2 comments · Fixed by microsoft/typespec#5510
Assignees

Comments

@XiaofeiCao
Copy link
Contributor

XiaofeiCao commented Jan 3, 2025

@XiaofeiCao XiaofeiCao self-assigned this Jan 3, 2025
@XiaofeiCao XiaofeiCao changed the title EMPTY_BYTE_ARRAY in client impl EMPTY_BYTE_ARRAY in client impl will cause compilation error Jan 3, 2025
@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Jan 3, 2025

Or just use new byte[0] in client?

I believe EMPTY_BYTE_ARRAY is mostly for performance?

@XiaofeiCao
Copy link
Contributor Author

XiaofeiCao commented Jan 3, 2025

I believe EMPTY_BYTE_ARRAY is mostly for performance?

Yes.

Or just use new byte[0] in client?

Yeah we could. Though this would compromise some performance, and we need some hack to check for ByteArray when doing default value expression conversion.
We could first implement this, and see if we got any complaints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants