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

Wrap maybe function in quotes, so it is treated as an atom #11251

Merged
merged 1 commit into from
May 17, 2024

Conversation

robertoaloi
Copy link
Contributor

Proposed Changes

Since maybe is added as an optional keyword in OTP 25, quote its usage as an atom, so that it does not break syntax highlighting and other language service features.

Types of Changes

What types of changes does your code introduce to this project?

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

@mkuratczyk
Copy link
Contributor

Thanks! Please note that we have a branch with OTP27 support where a similar (but different) change was already made: https://github.com/rabbitmq/rabbitmq-server/tree/otp27-support

I opted for a different name, since we already use it in some other places

@michaelklishin
Copy link
Member

@mkuratczyk given that OTP 27 support will likely get into v3.13.x, I'm leaning towards keeping the maybe name. 7bf9af5 uses opt but we have kept maybe for backwards compatibility when rabbit_types:option/1 was introduced, IIRC.

@lhoguin
Copy link
Contributor

lhoguin commented May 17, 2024

The maybe type is referring to https://wiki.haskell.org/Maybe which is used across languages and projects.

@michaelklishin
Copy link
Member

@lhoguin but so is option in rabbit_types:option/1. Java, Rust, Scala use Option for the same data type as Haskell's Maybe.

@michaelklishin
Copy link
Member

@robertoaloi thank you. We may change it soon, most likely by switching to rabbit_types:option/1 which was introduced for the same reason. But I see no harm in accepting this PR for now to unblock the continuous experimentation with EPL and the RabbitMQ codebase.

@michaelklishin michaelklishin merged commit eed86cb into rabbitmq:main May 17, 2024
9 checks passed
michaelklishin added a commit that referenced this pull request May 20, 2024
Wrap maybe function in quotes, so it is treated as an atom (backport #11251)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants