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
Fix Environment retrieve methods #2653
Fix Environment retrieve methods #2653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @DimaMishchenko! Changes look good, as mentioned, it'd be great to make this change non-breaking
Added backward compatibility to Environment retrieve methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - I'd just change the deprecation message but otherwise π from me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @DimaMishchenko - thanks for fixing this π
One additional suggestion would be to perhaps update the fixture https://github.com/tuist/tuist/blob/main/fixtures/framework_with_environment_variables/Project.swift to leverage the new syntax.
* main: Rebuild frameworks Remove unnecessary step Add Luis to the core team Fix Xcode version Fix syntax issue Bump gatsby-plugin-mdx from 1.10.0 to 2.0.1 in /next (tuist#2652) Plugins: Finalize support for tuist edit (tuist#2642) Drop support for Xcode 11.x (tuist#2651) docs: add tiarnann as a contributor (tuist#2657) Install script bug fix: Adding bin folder to usr/local/ when it is missing (tuist#2655) # Conflicts: # CHANGELOG.md
Done. Thank you @fortmarek and @kwridan |
let's merge this once CI is green, unfortunately, we have some issues on |
@all-contributors add @DimaMishchenko for code |
@pepibumur @DimaMishchenko already contributed before to code |
@DimaMishchenko could you please rebase and see if the pipeline succeeds now? The |
Description π
Fix of
Environment
variable retrieve methods provided in #1468Currently this functionality works incorrect.
If variable is not exists,
dynamicMember
will returnnil
andgetString
/getBoolean
will never be called.Also in case if variable exist and you use helper methods you still will get optional value.
Can be fixed by creating extension to
Optional
type.Example
Checklist β
CHANGELOG.md
has been updated to reflect the changes. In case of a breaking change, it's been flagged as such.