-
Notifications
You must be signed in to change notification settings - Fork 277
test: remove cgi and ostruct dependency for ruby 4 #2016
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
base: main
Are you sure you want to change the base?
test: remove cgi and ostruct dependency for ruby 4 #2016
Conversation
|
@xuan-cao-swi I know this is not ready for review but I think that https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-ruby%20cgi&type=code If we do not want to add a transitive dependency on the |
|
ostruct on the other hand is a test only dependency:
If we can find an alternative for OpenStruct I think that we should go for it. |
|
For replacement of cgi escape and unescape maybe using I just did test and found out if rake is 13.3, then no OpenStruct is required. I think old rake (13.1.0 and before) use OpenStruct. Currently most gemspec using rake ~> 12.0 (except log_sdk), maybe they can change to newer rake. |
|
Updated all rake to 13.3 for ruby 4. |
|
I do not know if they are functionally equivalent, e.g. of en irb(main):006> CGI.escape("*")
=> "%2A"
irb(main):007> URI.encode_www_form_component("*")
=> "*"
irb(main):008> URI.decode_www_form_component("%2A")
=> "*"
irb(main):010> CGI.unescape("*")
=> "*" |
|
It seems Decode seems aligned for asterisk. If we are ok with adding |
|
I think what we should do is consult the specification. Does it specify which to use? In inclined to keep this change but report it as potentially a breaking change. |
|
Based on the spec, baggage propagator and exporter protocol both use w3c baggage specification. Jaeger propagator will be deprecated. RFC 3986 is compatible with W3C Baggage specification. I think the most important consideration is to following Character Encoding guide Difference about space Difference about * (W3C Baggage allows both * and %2A for encoding *) |
|
Per our slack convo I think we agree that uri is the most correct per the spec. Let's use that and set this as a |
|
Actually how do you feel about splitting this or into separate ones. Have the URI fix in a separate PR from ostruct so it's more explicit |
Added cgi and ostruct gem since they are removed from ruby 4.
Also fixed some warning that is about constants reinitialization.