dpp icon indicating copy to clipboard operation
dpp copied to clipboard

Rsp support

Open John-Colvin opened this issue 6 years ago • 2 comments

For compatibilities sake I just took dmd's implementation and did the bare minimum to make it work.

There aren't any tests so far, I haven't properly navigated the test setup you're using here yet.

This is all that's necessary to work with https://github.com/John-Colvin/dub/tree/dpp_support

John-Colvin avatar Apr 09 '18 21:04 John-Colvin

Merging this without a test gives me the heebie jeebies, especially when the codecov check says -13% coverage.

You said that this is needed to work with your dub work - I assume that means you tested it manually? How so?

atilaneves avatar Apr 10 '18 14:04 atilaneves

Things that should be tested:

  • You can see the d compiler output when compilation fails (ideally even in infinite loop - e.g. ctfe loop forever - case, could be tested but probably not worth it)

  • make sure that any mixture of dpp and d files end up in the order they were originally passed when they hit the d compiler.

  • should be able to do compilation of .d files without any .dpp files (because it should be a drop-in replacement)

  • .rsp file, passed on command line as e.g. dpp someDFile.d @myArgs.rsp someDppFile.dpp -blahImAFlag -release with any possible ordering of those arguments. .rsp extension is not required. Contents of .rsp file is just command line arguments, arguments are separated by spaces, tabs, or newlines. Obviously arguments that contain spaces have to have quotes around them.

  • less important as dub doesn't use it, but still strictly needed to be transparent drop-in for dmd/ldc/gdc: flags in an environment variable. Contents rules are exactly the same as the file-based case. E.g. this, note no $

      export EXTRA_ARGS=-O -inline blah.dpp
      dpp < ... some args ... > @EXTRA_ARGS < ... some more args ... >
    

John-Colvin avatar May 03 '18 14:05 John-Colvin