[refactor] 함수 지역변수 id를 생성 시점에 발급 - #3097
Open
pekopekopekopayo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
함수 지역변수의 id가 생성 시점이 아니라 지역변수 블록의 드롭다운이 렌더링될 때(
block_func의menuName) 발급되고 있습니다.이 때문에 두 가지 문제가 있습니다.
functions[].localVariables에 id 없는 항목이 저장됩니다. 같은 프로젝트라도 편집 경로에 따라 저장 결과가 달라지고, id가 있다고 가정하는 코드에서 오동작의 원인이 될 수 있습니다. 실제로 id 없이 저장된 프로젝트를 확인했습니다.다음과 같이 변경합니다.
defaultLocalVariable에서 기존과 같은 형식(${func.id}_${generateHash()})으로 id를 생성 시점에 발급합니다.Function생성자에서 로드 시 보정합니다.EntryObject생성자가 sounds/pictures 의 누락된 id를 보정하는 것과 같은 방식입니다.menuName의 지연 발급을 제거합니다.