-
Notifications
You must be signed in to change notification settings - Fork 117
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
Escaping backslash does not work in front of replacement expression #746
Comments
This may actually be a bug in |
For now, you can work around this by adding an expression to the backslash: endpoint=foo${backslash}${path}
backslash=\\
path=bar |
I wonder if the config parser did not set the |
The Expression code works correctly and as expected. The main issue was when MP Config added support for Property Expressions; it defined a specific escape sequence to skip the expansion with So, to comply with MP Config I've added this: Lines 71 to 92 in 9fdb499
Which turns the Turning on the So at this point, I'm not totally sure what to do. Either we add another escape sequence for the @dmlloyd what do you think? |
In this regard (as in many others) I think we can see that MP Config is fundamentally broken. The caution/lesson here (which, as you know, I've stated repeatedly to the Jakarta Config spec group) is that when designing a specification with syntax, the syntax has to be clearly specified - at least more strongly than "let's put in a random solution without thinking too deeply about the potential problems". 😞 The potential problem in this case is that with In the end we need a syntax grammar which allows:
while hopefully accounting for Jakarta Config. It almost doesn't seem worth it. |
In my opinion I think we're better off having a consistent syntax that we can support, and just documenting the differences with MP Config and giving up on spec compliance altogether (unless the spec in question actually makes sense). |
I agree. I probably should have opposed this harder, but you know how things work. I don't think this is used extensively. Of course, there is a chance to break someone with unpredictable results, but I see no other consistent way to do it. I wouldn't worry about Jakarta Config having to support MP Config syntax. This will be the least of the problems with all the discussions and how the spec is moving in Jakarta Config. |
at least temporarily, and hopefully get a way to change the spec. |
I think we should be able to push a change to MP Config. @dmlloyd What do you think we propose to change it with the original implementation support of the double |
I'd have to review the syntax rules again before having an informed opinion, but I think it's a reasonable idea. My feeling is that |
Sure. |
I've found this comment from me: eclipse/microprofile-config#577 (comment) I guess that was not enough, but I'm also to blame here 👿 |
I can't find a way to evaluate successfully something like
x\${x}
tox\foo
.With config:
and code:
We get:
The
\
seems to escape the$
, resulting in${x}
not being evaluated.But then I can't escape the escape character.
/cc @radcortez
The text was updated successfully, but these errors were encountered: