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

Pass scalac flags to the endpoint #48

Closed
2 tasks done
jdesiloniz opened this issue Feb 22, 2017 · 2 comments · Fixed by #49
Closed
2 tasks done

Pass scalac flags to the endpoint #48

jdesiloniz opened this issue Feb 22, 2017 · 2 comments · Fixed by #49
Assignees

Comments

@jdesiloniz
Copy link

jdesiloniz commented Feb 22, 2017

  • We need to be able to pass Scala compiler flags to the endpoint, so they'll be added to the ones in use when the code snippets are executed.
  • Update the evaluator client so third-party users can send the compiler flags in a straightforward way.
@dominv
Copy link
Contributor

dominv commented Mar 7, 2017

@raulraja I've created a PR #49 that adds the ability to send scalac's flag to the endpoint but I've observed that some of the available flags cause an, initially, unexpected response. As an example:

For this request (with an already existing path):

{
	"resolvers":["https://oss.sonatype.org/content/repositories/releases"],
	"dependencies":[],
	"code":"{List(1, 3, 5)}",
	"compilerFlags":["-d", "/whatever/path" ]
}

I get a response like:

{
  "msg": "Runtime Error",
  "value": "None.get",
  "valueType": "java.util.NoSuchElementException",
  "compilationInfos": {}
}

Although the compiler has done his job right, according to the -d flag.

How should we proceed here? Do we have to control this kind of responses caused by the different flags available?

@raulraja
Copy link
Member

raulraja commented Mar 8, 2017

Can we restrict the passed flags to a subset? Only retain from the request those that we need or want to explicitly support in this round then we can evaluate down the road if we want to open this across the board for all flags. Obviously some of the compiler flags can even have security concerns and I think if we just allow a few for now it'd be better.

@dominv dominv assigned raulraja and unassigned dominv Mar 10, 2017
@dominv dominv assigned dominv and unassigned raulraja Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants