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

Merged
merged 4 commits into from Nov 15, 2017

Conversation

Projects
None yet
3 participants
@kanghyojun
Member

kanghyojun commented Nov 10, 2017

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.

@kanghyojun kanghyojun changed the title from WIP to (WIP) Compile service method annotation Nov 10, 2017

@@ -1075,7 +1077,7 @@ class {className}_Client($className):
payload=\{{commaNl payloadArguments}\},
# FIXME Give annotations.
service_annotations=\{\},
method_annotations=\{\},
method_annotations=\{\}

This comment has been minimized.

@hanc1208

@kanghyojun kanghyojun force-pushed the kanghyojun:compile-method-annotation branch from fba3b8a to 85371f9 Nov 12, 2017

@kanghyojun kanghyojun changed the title from (WIP) Compile service method annotation to Compile service method annotation Nov 12, 2017

@kanghyojun

This comment has been minimized.

Member

kanghyojun commented Nov 12, 2017

@dahlia @Kroisse @AiOO Please review this.

@dahlia

리뷰로 남긴 제안들은 지금 당장 안 해도 되긴 합니다.

]
methodAnnotations' :: T.Text
methodAnnotations' = wrapMap $ commaNl $ map compileMethodAnnotation
methodList

This comment has been minimized.

@dahlia

dahlia Nov 12, 2017

Member

결국 나중에 레코드나 유니온 클래스도 이런 애너테이션 메타데이터를 생성해줘야 하기 때문에, 이 코드들이 조만간 일반화되어서 where절 바깥으로 나가야 할 것 같네요. 미리 그렇게 해둘 필요는 없긴 합니다.

아예 Nirum.Targets.Python.Annotation, Nirum.Targets.Python.Name 뭐 이런 식으로 파이썬 타겟 내부에서 쓰이는 유틸리티 함수를 하위 모듈로 보내는 것도 한 방법일 것 같네요. 줄 자체가 너무 길어져서…

@kanghyojun kanghyojun force-pushed the kanghyojun:compile-method-annotation branch from c1c9e62 to 18a72d5 Nov 12, 2017

kanghyojun added some commits Nov 12, 2017

Compile method annotation
Print method annotations into __nirum_method_annotations__

@kanghyojun kanghyojun force-pushed the kanghyojun:compile-method-annotation branch from 18a72d5 to 2b7c1e2 Nov 14, 2017

@kanghyojun

This comment has been minimized.

Member

kanghyojun commented Nov 14, 2017

@dahlia 리베이스했습니다. 한번만더 리뷰 부탁드려요.

@dahlia

dahlia approved these changes Nov 14, 2017

@kanghyojun kanghyojun merged commit 74817f3 into nirum-lang:master Nov 15, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment