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

Fix path resolver not working when alias in middle #3544

Merged
merged 6 commits into from
Mar 12, 2020

Conversation

boydc2014
Copy link
Contributor

@boydc2014 boydc2014 commented Mar 12, 2020

Fix #3545 .

Our property assignment action, SetProperty, SetProperties, and EditArray are not working when the property contains dynamic values to evaluate, and the dynamic value is reference using a shortcut, for example

user[$mylist].todo // not working
user[dialog.mylist].todo // working

The root cause is our path resolver assuming alias (#, $) assume this alias at beginning, and do a full replace at the beginning, which cause broken path if alias is in middle.

The tranforming behavior is broken

user[$mylist].todo => dialog.mylist].todo // user[ is dropped
turn.recongized["$instance"] => dialog.instance"] // what's before $ is totally dropped

the fix is to enforce the transform only deals the alias at beginning.

@boydc2014 boydc2014 changed the title Fix path resolver assume alias at beginning Fix path resolver not working when alias in middle Mar 12, 2020
@boydc2014 boydc2014 added the P0 Must Fix. Release-blocker label Mar 12, 2020
@boydc2014 boydc2014 requested a review from chrimc62 March 12, 2020 13:29
@vishwacsena
Copy link
Contributor

Would take this for R9. Workaround is to not use path resolves in dynamic path.

@vishwacsena vishwacsena added R9 Release 9 - May 15th, 2020 and removed P0 Must Fix. Release-blocker labels Mar 12, 2020
Copy link
Contributor

@tomlm tomlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@boydc2014
Copy link
Contributor Author

Would take this for R9. Workaround is to not use path resolves in dynamic path.

Thanks, there are two ways to work around,

  1. use full path instead of shortcut, users[dialog.listType].todo will work
  2. resolve full paths with string intepolation, users['${$listType}'].todo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R9 Release 9 - May 15th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Property assignment with dynamic path not working
4 participants