Skip to content

Make generated Python codes refactored for new transport layer - #149

Merged
dahlia merged 5 commits into
nirum-lang:masterfrom
dahlia:transport
Jul 11, 2017
Merged

dahlia merged 5 commits into
nirum-lang:masterfrom
dahlia:transport

Conversation

@dahlia

@dahlia dahlia commented Jul 10, 2017 •

Copy link
Copy Markdown
Member

This compiler patch is for suggested new transport layer nirum-lang/nirum-python#79 and related other things. It also is required by another patch on nirum-python nirum-lang/nirum-python#92 and need to be merged first.

Key changes:

  • Generated constructors of service clients became to take a nirum.transport.Transport instance.
  • Followed renamed/moved import paths of the runtime classes (e.g. nirum.rpc.Service → nirum.service.Service).
  • The way to avoid name collision between generated types and runtime classes is changed. The runtime library had provided alternative names like service_type for Service and generated imports had been like from nirum.rpc import service_type, but it's now from nirum.service import Service as service_type.

As its build requires transport features made by nirum-lang/nirum-python#92 (which is not merged yet) and two patches have a circular dependency each other, I temporarily switched the CI scripts to use DEVRUNTIME_REPO=dahlia/nirum-python DEVRUNTIME_REF=transport.

@dahlia dahlia added the typ:enhance Type: Enhancement/new feature label Jul 10, 2017
@dahlia dahlia self-assigned this Jul 10, 2017
@dahlia
dahlia requested a review from kanghyojun July 10, 2017 17:10
@kanghyojun

Copy link
Copy Markdown
Member

윈도우에서 깨지네요.

@dahlia
dahlia merged commit fe068c6 into nirum-lang:master Jul 11, 2017
@dahlia dahlia added cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) cmp:runtime Component: Target runtimes cmp:transport Component: Transports labels Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) cmp:runtime Component: Target runtimes cmp:transport Component: Transports typ:enhance Type: Enhancement/new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants