-
Notifications
You must be signed in to change notification settings - Fork 27
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
Compile service method annotation #194
Compile service method annotation #194
Conversation
src/Nirum/Targets/Python.hs
Outdated
@@ -1075,7 +1077,7 @@ class {className}_Client($className): | |||
payload=\{{commaNl payloadArguments}\}, | |||
# FIXME Give annotations. | |||
service_annotations=\{\}, | |||
method_annotations=\{\}, | |||
method_annotations=\{\} |
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.
?!?!?!??!!
fba3b8a
to
85371f9
Compare
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.
리뷰로 남긴 제안들은 지금 당장 안 해도 되긴 합니다.
src/Nirum/Targets/Python.hs
Outdated
] | ||
methodAnnotations' :: T.Text | ||
methodAnnotations' = wrapMap $ commaNl $ map compileMethodAnnotation | ||
methodList |
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.
결국 나중에 레코드나 유니온 클래스도 이런 애너테이션 메타데이터를 생성해줘야 하기 때문에, 이 코드들이 조만간 일반화되어서 where
절 바깥으로 나가야 할 것 같네요. 미리 그렇게 해둘 필요는 없긴 합니다.
아예 Nirum.Targets.Python.Annotation
, Nirum.Targets.Python.Name
뭐 이런 식으로 파이썬 타겟 내부에서 쓰이는 유틸리티 함수를 하위 모듈로 보내는 것도 한 방법일 것 같네요. 줄 자체가 너무 길어져서…
c1c9e62
to
18a72d5
Compare
Print method annotations into __nirum_method_annotations__
18a72d5
to
2b7c1e2
Compare
@dahlia 리베이스했습니다. 한번만더 리뷰 부탁드려요. |
Since we need metadata of annotations on service class to route HTTP paths, i added
__nirum_method_annotations__
property.__nirum_method_annotations__
contain metadata of method annotations as nirum.datastaructures.Map type because it have to be immutable data.