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

Add function to compile module #7

Closed
lucaswerkmeister opened this issue May 11, 2017 · 0 comments
Closed

Add function to compile module #7

lucaswerkmeister opened this issue May 11, 2017 · 0 comments
Milestone

Comments

@lucaswerkmeister
Copy link
Owner

  • Check if there’s a package.ceylon in the current directory. If not, abort.
  • Traverse the parent directories until a module.ceylon is found. (Make sure not to infinite loop when reaching the root directory.)
  • If the module.ceylon specifies a native annotation (a very crude heuristic will do – native *("jvm") as regex, for instance), remember that, otherwise default to compiling for JVM.
  • Walk one directory up. (TODO: do we need to cater for different source layouts, e. g. src/main/ceylon/?)
  • Run ceylon compile/compile-js.
@lucaswerkmeister lucaswerkmeister added this to the 1.0 milestone May 11, 2017
lucaswerkmeister added a commit that referenced this issue Jun 5, 2017
These functions will be used for #7 and #10.
lucaswerkmeister added a commit that referenced this issue Jun 5, 2017
The upcoming function to detect the backend (for #7) will also need it.

Includes a test, of course :)
lucaswerkmeister added a commit that referenced this issue Jun 5, 2017
The heuristic used is “native annotation on an unindented line”, which
is somewhat crude, but good enough to ignore native imports (see
ceylon-backend-native-imports-test).

Part of #7.
lucaswerkmeister added a commit that referenced this issue Jun 5, 2017
The upcoming function to compile the module (#7) will also need it.
lucaswerkmeister added a commit that referenced this issue Jun 5, 2017
Necessary because our command names aren’t consistent. Perhaps I’ll open
an issue to request a compile-jvm alias if I feel like it, but it feels
pretty minor.

Part of #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant