shamblett / coap

A Coap package for dart
Other
16 stars 13 forks source link

fix: change identifier of OptionType name field #101

Closed JKRhb closed 1 year ago

JKRhb commented 2 years ago

In the current Dart version, using a name field in an enhanced enum (as we currently do in the OptionType enum) causes a segmentation fault (c.f., https://github.com/dart-lang/sdk/issues/49296). Although this will be fixed in the next version, this PR simply changes the identifier of the name in question as a workaround to avoid segfaults.

JosefWN commented 2 years ago

Since it's already merged maybe we could wait for the fix to be released? Just using name looks a little prettier :)

JKRhb commented 2 years ago

Since it's already merged maybe we could wait for the fix to be released? Just using name looks a little prettier :)

Yeah, that's true :) However, it seems as if the bug is still present in Dart 2.17.5 (see here) :/ I hope it will be part of a 2.17.6 release, otherwise we might need to increase the required version to 2.18 if it is only included then.

JKRhb commented 1 year ago

@JosefWN Hmm, in the issue, the contributor of the fix wrote that it will only be included in Dart 2.18, which seems to be scheduled for August :/ So I think it would be good if we could merge this PR already to be able to continue with adding new features/refactorings.