Code Monkey home page Code Monkey logo

Comments (5)

elkkhan avatar elkkhan commented on June 9, 2024 1

Hi @cpovirk, thanks for the response!
Unfortunately both tips didn't work:

  • Passing -J type flags to the compiler via Java Compiler API is not supported (J flag is not in the BASIC OptionGroup)

  • Passing those options to the JVM also didn't do anything (attaching a screnshot below in case I misunderstood what you meant by that)

Screenshot 2024-01-08 at 20 56 06 ___________________________________________________________________________________________

EDIT: Apologies, I was setting the options on the wrong text field (program arguments). Everything worked once I set them as VM options (Modify Options -> Add VM options).
P.S they need to be set without the -J prefix.

Thanks alot @cpovirk!

from compile-testing.

elkkhan avatar elkkhan commented on June 9, 2024 1

Great, I'm glad it worked!

I wonder if we should have Compile-Testing produce an error if anyone tries to pass it these flags. The error could advise people what to do instead.

that sounds like a nice improvement, i'd like to try to contribute this. will get on it this week

from compile-testing.

cpovirk avatar cpovirk commented on June 9, 2024

My memory on this is fuzzy, but I want to say that you need to pass those as -J options (-J--add-exports=jdk.compiler/...) and/or that you need to set them on the original test VM rather than trying to pass them to Compiler.javac().withOptions, maybe?

I'd probably try the latter, given that it's what Error Prone does for its maven-surefire-plugin run.

from compile-testing.

cpovirk avatar cpovirk commented on June 9, 2024

Great, I'm glad it worked!

I wonder if we should have Compile-Testing produce an error if anyone tries to pass it these flags. The error could advise people what to do instead.

from compile-testing.

elkkhan avatar elkkhan commented on June 9, 2024

@cpovirk can you please take a look at the attached PR?
Thanks!

from compile-testing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.