On 2014-09-04, 2:03 PM, Jonas Sicking wrote:
On Thu, Sep 4, 2014 at 8:50 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com> wrote:
On 2014-09-04, 1:37 AM, Botond Ballo wrote:

From: "Boris Zbarsky" <bzbar...@mit.edu>
To: dev-platform@lists.mozilla.org
Sent: Thursday, September 4, 2014 1:24:58 AM
Subject: Re: PSA: ./mach build <subdirectory> doesn't work reliably any
longer

On 9/4/14, 12:51 AM, Joshua Cranmer 🐧 wrote:

It sounds to me like what you really want is support for a red squiggly
line in your IDE


Not quite, because red squiggly lines don't catch weird C++ namespacing
rules, lack of conversion operators that should be present, etc...


They can if they are produced by running (the front-end of) a compiler
on the source files in question and parsing its output.


Yes, indeed.  I think all we need for that to become reality is bug 904572.
With that, we'd be able to use tools such as clang-check:
<http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html#using-clang-tools>

That being said, these tools typically work well on a per-file basis, so the
workflow may be a bit clunky when you're editing a header and don't know
exactly which .cpp files it might affect.  So, even with this, bz's use case
will not be completely satisfied, AFAICT.

This sounds a bit overly complex to me.

It sounds to me like the main requirement here is to enable doing a
compile step on a command-line specified directory or file. Possibly
even a list of files/directories.

Note that this is just about doing the C++ compiling. Linking and
other steps does not provide as much error information so seems less
important.

Having the build system figure out which files use a particular
function sounds like it would be slow enough that it's better to
simply type out the files/directories you know are affected. And once
you get those passing you can do a more general full-tree build.

Or is the ask here really for something more complex?

I don't think that is what is being proposed here. A compilation database is a simple file that lists the command line arguments that the build system uses to build any source file. With that file being generated, you can hook things such as your editor up to background invocations of the compiler to enable several features, such as code completion (that uses the type information, so for example foo-> would only lists member functions of foo's type, etc.), syntax checking (so that your editor can highlight the code which the compiler rejects without you having to invoke the build system yourself.)

What you are suggesting above (being able to build only one source file or a directory) is what was being discussed in other parts of this thread.

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to