Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-16 Thread Botond Ballo
On Wed, Sep 16, 2020 at 3:00 AM Andi-Bogdan Postelnicu 
wrote:

> On 16 Sep 2020, at 04:14, Botond Ballo  wrote:
>
> On Tue, Sep 15, 2020 at 6:55 PM Jean-Yves Avenard 
> wrote:
>
>> This broke several features for me (and I use VSCode all the time). One in
>> particular was the inability to switch between code and header (Ctrl-K
>> Ctrl-O).
>>
>
> clangd supports this, but it's under a custom command name (as it's not
> part of the Language Server Protocol).
>
> Thank you for adding this, maybe we should also add to our documentation?
>

Good idea. I posted a documentation patch at
https://bugzilla.mozilla.org/show_bug.cgi?id=1665499.

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


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-16 Thread Jean-Yves Avenard
Hi.

Started to play with this. I've used VSCode for several years, though
multi-process debugging capabilities make it a tad useless as a debugger.

Now what we need is something like
https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool#overview

Something that will automatically attach any new process to the debugger.

When will it be ready ? :D

Jean-Yves

On Wed, Sep 16, 2020 at 5:00 PM Andi-Bogdan Postelnicu 
wrote:

>
>
> On 16 Sep 2020, at 04:14, Botond Ballo  wrote:
>
> On Tue, Sep 15, 2020 at 6:55 PM Jean-Yves Avenard 
> wrote:
>
>> This broke several features for me (and I use VSCode all the time). One in
>> particular was the inability to switch between code and header (Ctrl-K
>> Ctrl-O).
>>
>
> clangd supports this, but it's under a custom command name (as it's not
> part of the Language Server Protocol).
>
> Thank you for adding this, maybe we should also add to our documentation?
>
> If you go to Keyboard Shortcuts, and search for the command
> "clangd.switchheadersource", you can bind your preferred shortcut to it.
>
>
>> Finding symbol definition broke under many cases too.
>>
>
> This is one we'd have to examine on a case-by-case basis. Some of them may
> be upstream issues in clangd, but some may be issues in our setup (e.g.
> related to unified builds).
>
> We should file a bug here an investigate on a per-module-basis, since from
> our testing this feature works. I reckon that a problem may be triggered
> with out unified build system.
>
>
> Andi, do you have a suggestion for how to track these? Should we encourage
> people to file Bugzilla tickets for them, which we can then triage (and if
> appropriate, we can file upstream clangd issues)?
>
> Yes, we have Bug 1662709
>  that is a META bug
> acting as an aggregator for all bugs that are related with VSCode
> deployment. All issues should block that bug and we should triage them.
> My take on this is that if we find bugs in clangd extension or in clangd
> itself we should upstream the fixes, at least for the clangd extension
> since we don’t ship it in our environment. clangd on the other hand we ship
> it in our artifacts so if we can’t upstream fixes, due to various reasons,
> most probable they get to land in major or dot releases of clang, we apply
> them locally when we build the artifacts.
>
> Cheers,
> Botond
>
>
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-16 Thread Andi-Bogdan Postelnicu


> On 16 Sep 2020, at 04:14, Botond Ballo  wrote:
> 
> On Tue, Sep 15, 2020 at 6:55 PM Jean-Yves Avenard  > wrote:
> This broke several features for me (and I use VSCode all the time). One in
> particular was the inability to switch between code and header (Ctrl-K
> Ctrl-O).
> 
> clangd supports this, but it's under a custom command name (as it's not part 
> of the Language Server Protocol).
> 
Thank you for adding this, maybe we should also add to our documentation?
> If you go to Keyboard Shortcuts, and search for the command 
> "clangd.switchheadersource", you can bind your preferred shortcut to it.
> 
> Finding symbol definition broke under many cases too.
> 
> This is one we'd have to examine on a case-by-case basis. Some of them may be 
> upstream issues in clangd, but some may be issues in our setup (e.g. related 
> to unified builds).
We should file a bug here an investigate on a per-module-basis, since from our 
testing this feature works. I reckon that a problem may be triggered with out 
unified build system.
> 
> Andi, do you have a suggestion for how to track these? Should we encourage 
> people to file Bugzilla tickets for them, which we can then triage (and if 
> appropriate, we can file upstream clangd issues)?
> 
Yes, we have Bug 1662709  
that is a META bug acting as an aggregator for all bugs that are related with 
VSCode deployment. All issues should block that bug and we should triage them.
My take on this is that if we find bugs in clangd extension or in clangd itself 
we should upstream the fixes, at least for the clangd extension since we don’t 
ship it in our environment. clangd on the other hand we ship it in our 
artifacts so if we can’t upstream fixes, due to various reasons, most probable 
they get to land in major or dot releases of clang, we apply them locally when 
we build the artifacts.

> Cheers,
> Botond



signature.asc
Description: Message signed with OpenPGP
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-15 Thread Botond Ballo
On Tue, Sep 15, 2020 at 6:55 PM Jean-Yves Avenard 
wrote:

> This broke several features for me (and I use VSCode all the time). One in
> particular was the inability to switch between code and header (Ctrl-K
> Ctrl-O).
>

clangd supports this, but it's under a custom command name (as it's not
part of the Language Server Protocol).

If you go to Keyboard Shortcuts, and search for the command
"clangd.switchheadersource", you can bind your preferred shortcut to it.


> Finding symbol definition broke under many cases too.
>

This is one we'd have to examine on a case-by-case basis. Some of them may
be upstream issues in clangd, but some may be issues in our setup (e.g.
related to unified builds).

Andi, do you have a suggestion for how to track these? Should we encourage
people to file Bugzilla tickets for them, which we can then triage (and if
appropriate, we can file upstream clangd issues)?

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


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-15 Thread Jean-Yves Avenard
Hi.

I don't know if that's related, but when recently VSCode started to show
clangd as a recommended extension for the project. Which I installed.

This broke several features for me (and I use VSCode all the time). One in
particular was the inability to switch between code and header (Ctrl-K
Ctrl-O).
Finding symbol definition broke under many cases too.

So I ended up uninstalling the clangd extension.

Is this a known issue?

Jean-Yves


On Fri, Sep 11, 2020 at 3:47 PM Andi-Bogdan Postelnicu 
wrote:

> First of all you will need to get VSCode and mozilla repo. Besides that
> you have the `./mach bootstrap` environment that downloads everything that
> you need like Python, Node, LLVM and the rest of packages that we need to
> build Firefox.
> Once the bootstrap environment is setup is very easy to have VSCode
> configured, just use:
>
> `./mach ide vscode`
>
> The solution will be generated under `.vscode` directory and a temporary
> compilation database will be created in the obj directory. The IDE will be
> automatically open and you will be prompted with a list of extension that
> are going to be installed, this list is situated in
> `.vscode/extensions.json`.
>
> This should be it, after the last step you should have a fully working
> IDE, no matter the platform, Win64, MaxOS64 or Linux64.
>
> Hope this sheds some light,
> ANdi
>
> > On 10 Sep 2020, at 19:48, mhoye  wrote:
> >
> >
> > This is amazing work.
> >
> > For the sake of new user documentation, I have a question: From scratch,
> for me to get from zero to VS Code Community edition to "I have everything
> I need to work on Firefox", what is the consensus around the components or
> options I need to pick to get myself close to an ideal VS setup? I haven't
> revisited this on a clean machine in a long time, and this seems like as
> good a time as any to update that information.
> >
> > I think the answer is, Python, Node, C/C++ desktop and mobile... have I
> missed any, and are there other workload options that would help on first
> setup?
> >
> > - mhoye
> >
> > ------ Original Message ------
> > From: "Andrew Halberstadt" 
> > To: "Andi-Bogdan Postelnicu" 
> > Cc: "dev-platform" 
> > Sent: 2020-09-10 12:29:48 PM
> > Subject: Re: Visual Studio Code integration with `clangd` for C/C++
> development
> >
> >> This is great, thanks Andi!
> >>
> >> Are there any plans to introduce a `mach lint` integration as well? Or
> is
> >> that what is already being used for "inline parsing errors with limited
> >> auto-fix hints"?
> >>
> >>
> >> On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu <
> a...@mozilla.com>
> >> wrote:
> >>
> >>> TLDR: VSCode users can type `./mach ide vscode` in order to get code
> >>> completion, reference navigation, refactoring, reformatting, etc.
> >>>
> >>> Hello all,
> >>>
> >>> VSCode <https://github.com/microsoft/vscode> is a multi-platform
> >>> open-source programming editor developed by Microsoft and volunteers.
> It is
> >>> partly built using source-code components but also uses proprietary
> >>> Microsoft code. It has support for many programming languages using
> >>> extensions.
> >>> In the past we had a minimal
> >>> <https://searchfox.org/mozilla-central/source/.vscode> configuration
> setup
> >>> in the tree that reflected the basic extensions
> >>> <https://searchfox.org/mozilla-central/source/.vscode/extensions.json>
> >>> that
> >>> should be used and also some tasks
> >>> <https://searchfox.org/mozilla-central/source/.vscode/tasks.json>
> that can
> >>> be triggered from the editor.
> >>>
> >>> Now, we significantly improved that!
> >>>
> >>> Starting with Bug 1656740
> >>> <https://bugzilla.mozilla.org/show_bug.cgi?id=1656740>, we’ve added
> >>> comprehensive support for C/C++with the help of the `clangd` extension
> for
> >>> Firefox development. Leveraging the `clang` toolchain compiler we now
> have
> >>> support in the IDE for:
> >>>
> >>>1.
> >>>
> >>>Syntax highlighting;
> >>>2.
> >>>
> >>>IntelliSense with comprehensive code completion and suggestion;
> >>>
> >>>
> >>>
> >>>1.
> >>>
> >>>Go-to definition and Go-

Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-11 Thread Andi-Bogdan Postelnicu
The documentation for the integration of VSCode with the Mozilla ecosystem is 
now live at https://firefox-source-docs.mozilla.org/contributing/vscode.html

> On 10 Sep 2020, at 19:19, Andi-Bogdan Postelnicu  wrote:
> 
> TLDR: VSCode users can type `./mach ide vscode` in order to get code 
> completion, reference navigation, refactoring, reformatting, etc.
> 
> Hello all,
> 
> VSCode  is a multi-platform open-source 
> programming editor developed by Microsoft and volunteers. It is partly built 
> using source-code components but also uses proprietary Microsoft code. It has 
> support for many programming languages using extensions.
> In the past we had a minimal 
>  configuration setup in 
> the tree that reflected the basic extensions 
>  that 
> should be used and also some tasks 
>  that can be 
> triggered from the editor.
> 
> Now, we significantly improved that!
> 
> Starting with Bug 1656740 
> , we’ve added 
> comprehensive support for C/C++with the help of the `clangd` extension for 
> Firefox development. Leveraging the `clang` toolchain compiler we now have 
> support in the IDE for:
> Syntax highlighting;
> IntelliSense with comprehensive code completion and suggestion;
> 
> 
> Go-to definition and Go-to declaration;
> 
> Find all references
> 
> Open type hierarchy;
> 
> Rename symbol, all usages of the symbol will be renamed, including 
> declaration, definition and references;
> 
> Code formatting, based on `clang-format` that respects our coding standard 
> using the `.clang-format` and `.clang-format-ignore` files. Format can be 
> performed on an entire file or on a code selection;
> 
> Inline parsing errors with limited auto-fix hints;
> 
> Basic static-code analysis using `clang-tidy` and our list of enabled 
> checkers. (This is still in progress not all checkers are supported by 
> `clangd`);
> 
> This new eco-system for code development is supported on all platforms that 
> we officially support.
> 
> In order to have this setup, download and install `VSCode` and run the 
> following command:
> ./mach ide vscode
> 
> Please file any issues that you might encounter using this setup please as 
> blocking bugs to Bug 1662709 
> .
> 
> I would also like to address many thanks to Jonathan Watt and Botond Ballo, 
> without their active support this would not have been made possible.
> 
> Many thanks,
> Andi, on behalf of the team



signature.asc
Description: Message signed with OpenPGP
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Andi-Bogdan Postelnicu
First of all you will need to get VSCode and mozilla repo. Besides that you 
have the `./mach bootstrap` environment that downloads everything that you need 
like Python, Node, LLVM and the rest of packages that we need to build Firefox.
Once the bootstrap environment is setup is very easy to have VSCode configured, 
just use:

`./mach ide vscode`

The solution will be generated under `.vscode` directory and a temporary 
compilation database will be created in the obj directory. The IDE will be 
automatically open and you will be prompted with a list of extension that are 
going to be installed, this list is situated in `.vscode/extensions.json`.

This should be it, after the last step you should have a fully working IDE, no 
matter the platform, Win64, MaxOS64 or Linux64.

Hope this sheds some light,
ANdi

> On 10 Sep 2020, at 19:48, mhoye  wrote:
> 
> 
> This is amazing work.
> 
> For the sake of new user documentation, I have a question: From scratch, for 
> me to get from zero to VS Code Community edition to "I have everything I need 
> to work on Firefox", what is the consensus around the components or options I 
> need to pick to get myself close to an ideal VS setup? I haven't revisited 
> this on a clean machine in a long time, and this seems like as good a time as 
> any to update that information.
> 
> I think the answer is, Python, Node, C/C++ desktop and mobile... have I 
> missed any, and are there other workload options that would help on first 
> setup?
> 
> - mhoye
> 
> -- Original Message --
> From: "Andrew Halberstadt" 
> To: "Andi-Bogdan Postelnicu" 
> Cc: "dev-platform" 
> Sent: 2020-09-10 12:29:48 PM
> Subject: Re: Visual Studio Code integration with `clangd` for C/C++ 
> development
> 
>> This is great, thanks Andi!
>> 
>> Are there any plans to introduce a `mach lint` integration as well? Or is
>> that what is already being used for "inline parsing errors with limited
>> auto-fix hints"?
>> 
>> 
>> On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu 
>> wrote:
>> 
>>> TLDR: VSCode users can type `./mach ide vscode` in order to get code
>>> completion, reference navigation, refactoring, reformatting, etc.
>>> 
>>> Hello all,
>>> 
>>> VSCode <https://github.com/microsoft/vscode> is a multi-platform
>>> open-source programming editor developed by Microsoft and volunteers. It is
>>> partly built using source-code components but also uses proprietary
>>> Microsoft code. It has support for many programming languages using
>>> extensions.
>>> In the past we had a minimal
>>> <https://searchfox.org/mozilla-central/source/.vscode> configuration setup
>>> in the tree that reflected the basic extensions
>>> <https://searchfox.org/mozilla-central/source/.vscode/extensions.json>
>>> that
>>> should be used and also some tasks
>>> <https://searchfox.org/mozilla-central/source/.vscode/tasks.json> that can
>>> be triggered from the editor.
>>> 
>>> Now, we significantly improved that!
>>> 
>>> Starting with Bug 1656740
>>> <https://bugzilla.mozilla.org/show_bug.cgi?id=1656740>, we’ve added
>>> comprehensive support for C/C++with the help of the `clangd` extension for
>>> Firefox development. Leveraging the `clang` toolchain compiler we now have
>>> support in the IDE for:
>>> 
>>>1.
>>> 
>>>Syntax highlighting;
>>>2.
>>> 
>>>IntelliSense with comprehensive code completion and suggestion;
>>> 
>>> 
>>> 
>>>1.
>>> 
>>>Go-to definition and Go-to declaration;
>>>2.
>>> 
>>>Find all references
>>>3.
>>> 
>>>Open type hierarchy;
>>>4.
>>> 
>>>Rename symbol, all usages of the symbol will be renamed, including
>>>declaration, definition and references;
>>>5.
>>> 
>>>Code formatting, based on `clang-format` that respects our coding
>>>standard using the `.clang-format` and `.clang-format-ignore` files.
>>> Format
>>>can be performed on an entire file or on a code selection;
>>>6.
>>> 
>>>Inline parsing errors with limited auto-fix hints;
>>> 
>>> 
>>>1.
>>> 
>>>Basic static-code analysis using `clang-tidy` and our list of enabled
>>>checkers. (This is still in progress not all checkers are supported by
>>>`cl

Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Andi-Bogdan Postelnicu
I’m sure down the road we will have an extension and integrate the entire 
linting system into vscode.

> On 10 Sep 2020, at 19:29, Andrew Halberstadt  wrote:
> 
> This is great, thanks Andi!
> 
> Are there any plans to introduce a `mach lint` integration as well? Or is 
> that what is already being used for "inline parsing errors with limited 
> auto-fix hints"?
> 
> 
> On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu  > wrote:
> TLDR: VSCode users can type `./mach ide vscode` in order to get code
> completion, reference navigation, refactoring, reformatting, etc.
> 
> Hello all,
> 
> VSCode  > is a multi-platform
> open-source programming editor developed by Microsoft and volunteers. It is
> partly built using source-code components but also uses proprietary
> Microsoft code. It has support for many programming languages using
> extensions.
> In the past we had a minimal
>  > configuration setup
> in the tree that reflected the basic extensions
>  > that
> should be used and also some tasks
>  > that can
> be triggered from the editor.
> 
> Now, we significantly improved that!
> 
> Starting with Bug 1656740
>  >, we’ve added
> comprehensive support for C/C++with the help of the `clangd` extension for
> Firefox development. Leveraging the `clang` toolchain compiler we now have
> support in the IDE for:
> 
>1.
> 
>Syntax highlighting;
>2.
> 
>IntelliSense with comprehensive code completion and suggestion;
> 
> 
> 
>1.
> 
>Go-to definition and Go-to declaration;
>2.
> 
>Find all references
>3.
> 
>Open type hierarchy;
>4.
> 
>Rename symbol, all usages of the symbol will be renamed, including
>declaration, definition and references;
>5.
> 
>Code formatting, based on `clang-format` that respects our coding
>standard using the `.clang-format` and `.clang-format-ignore` files. Format
>can be performed on an entire file or on a code selection;
>6.
> 
>Inline parsing errors with limited auto-fix hints;
> 
> 
>1.
> 
>Basic static-code analysis using `clang-tidy` and our list of enabled
>checkers. (This is still in progress not all checkers are supported by
>`clangd`);
> 
> 
> This new eco-system for code development is supported on all platforms that
> we officially support.
> 
> In order to have this setup, download and install `VSCode` and run the
> following command:
> 
> ./mach ide vscode
> 
> Please file any issues that you might encounter using this setup please as
> blocking bugs to Bug 1662709
>  >.
> 
> I would also like to address many thanks to Jonathan Watt and Botond Ballo,
> without their active support this would not have been made possible.
> 
> Many thanks,
> 
> Andi, on behalf of the team
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org 
> https://lists.mozilla.org/listinfo/dev-platform 
> 


signature.asc
Description: Message signed with OpenPGP
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Andi-Bogdan Postelnicu
Please see my comment inlined

> On 11 Sep 2020, at 00:25, Botond Ballo  wrote:
> 
> Thanks a lot for your work on this, Andi, this is really neat!
> 
> One question:
> 
> On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu  > wrote:
> VSCode  > is a multi-platform
> open-source programming editor developed by Microsoft and volunteers. It is
> partly built using source-code components but also uses proprietary
> Microsoft code. It has support for many programming languages using
> extensions.
> 
> As far as I can tell, VSCode itself (without extensions) is FOSS, and all the 
> extensions listed in our extensions.json are too. The Microsoft C/C++ 
> extension is not, but now that we have clangd we don't need that any more 
> (and it's no longer listed in extensions.json). Is there any remaining 
> "proprietary Microsoft code" in our setup that I'm overlooking?
No, I think we are 100% FOSS right now, as far as I can tell we use only open 
source extensions.
> 
> Thanks,
> Botond



signature.asc
Description: Message signed with OpenPGP
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Botond Ballo
Thanks a lot for your work on this, Andi, this is really neat!

One question:

On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu 
wrote:

> VSCode  is a multi-platform
> open-source programming editor developed by Microsoft and volunteers. It is
> partly built using source-code components but also uses proprietary
> Microsoft code. It has support for many programming languages using
> extensions.
>

As far as I can tell, VSCode itself (without extensions) is FOSS, and all
the extensions listed in our extensions.json are too. The Microsoft C/C++
extension is not, but now that we have clangd we don't need that any more
(and it's no longer listed in extensions.json). Is there any remaining
"proprietary Microsoft code" in our setup that I'm overlooking?

Thanks,
Botond
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re[2]: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread mhoye


This is amazing work.

For the sake of new user documentation, I have a question: From scratch, 
for me to get from zero to VS Code Community edition to "I have 
everything I need to work on Firefox", what is the consensus around the 
components or options I need to pick to get myself close to an ideal VS 
setup? I haven't revisited this on a clean machine in a long time, and 
this seems like as good a time as any to update that information.


I think the answer is, Python, Node, C/C++ desktop and mobile... have I 
missed any, and are there other workload options that would help on 
first setup?


- mhoye

-- Original Message --
From: "Andrew Halberstadt" 
To: "Andi-Bogdan Postelnicu" 
Cc: "dev-platform" 
Sent: 2020-09-10 12:29:48 PM
Subject: Re: Visual Studio Code integration with `clangd` for C/C++ 
development



This is great, thanks Andi!

Are there any plans to introduce a `mach lint` integration as well? Or is
that what is already being used for "inline parsing errors with limited
auto-fix hints"?


On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu 
wrote:


 TLDR: VSCode users can type `./mach ide vscode` in order to get code
 completion, reference navigation, refactoring, reformatting, etc.

 Hello all,

 VSCode <https://github.com/microsoft/vscode> is a multi-platform
 open-source programming editor developed by Microsoft and volunteers. It is
 partly built using source-code components but also uses proprietary
 Microsoft code. It has support for many programming languages using
 extensions.
 In the past we had a minimal
 <https://searchfox.org/mozilla-central/source/.vscode> configuration setup
 in the tree that reflected the basic extensions
 <https://searchfox.org/mozilla-central/source/.vscode/extensions.json>
 that
 should be used and also some tasks
 <https://searchfox.org/mozilla-central/source/.vscode/tasks.json> that can
 be triggered from the editor.

 Now, we significantly improved that!

 Starting with Bug 1656740
 <https://bugzilla.mozilla.org/show_bug.cgi?id=1656740>, we’ve added
 comprehensive support for C/C++with the help of the `clangd` extension for
 Firefox development. Leveraging the `clang` toolchain compiler we now have
 support in the IDE for:

1.

Syntax highlighting;
2.

IntelliSense with comprehensive code completion and suggestion;



1.

Go-to definition and Go-to declaration;
2.

Find all references
3.

Open type hierarchy;
4.

Rename symbol, all usages of the symbol will be renamed, including
declaration, definition and references;
5.

Code formatting, based on `clang-format` that respects our coding
standard using the `.clang-format` and `.clang-format-ignore` files.
 Format
can be performed on an entire file or on a code selection;
6.

Inline parsing errors with limited auto-fix hints;


1.

Basic static-code analysis using `clang-tidy` and our list of enabled
checkers. (This is still in progress not all checkers are supported by
`clangd`);


 This new eco-system for code development is supported on all platforms that
 we officially support.

 In order to have this setup, download and install `VSCode` and run the
 following command:

 ./mach ide vscode

 Please file any issues that you might encounter using this setup please as
 blocking bugs to Bug 1662709
 <https://bugzilla.mozilla.org/show_bug.cgi?id=1662709>.

 I would also like to address many thanks to Jonathan Watt and Botond Ballo,
 without their active support this would not have been made possible.

 Many thanks,

 Andi, on behalf of the team
 ___
 dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Andrew Halberstadt
This is great, thanks Andi!

Are there any plans to introduce a `mach lint` integration as well? Or is
that what is already being used for "inline parsing errors with limited
auto-fix hints"?


On Thu, Sep 10, 2020 at 12:20 PM Andi-Bogdan Postelnicu 
wrote:

> TLDR: VSCode users can type `./mach ide vscode` in order to get code
> completion, reference navigation, refactoring, reformatting, etc.
>
> Hello all,
>
> VSCode  is a multi-platform
> open-source programming editor developed by Microsoft and volunteers. It is
> partly built using source-code components but also uses proprietary
> Microsoft code. It has support for many programming languages using
> extensions.
> In the past we had a minimal
>  configuration setup
> in the tree that reflected the basic extensions
> 
> that
> should be used and also some tasks
>  that can
> be triggered from the editor.
>
> Now, we significantly improved that!
>
> Starting with Bug 1656740
> , we’ve added
> comprehensive support for C/C++with the help of the `clangd` extension for
> Firefox development. Leveraging the `clang` toolchain compiler we now have
> support in the IDE for:
>
>1.
>
>Syntax highlighting;
>2.
>
>IntelliSense with comprehensive code completion and suggestion;
>
>
>
>1.
>
>Go-to definition and Go-to declaration;
>2.
>
>Find all references
>3.
>
>Open type hierarchy;
>4.
>
>Rename symbol, all usages of the symbol will be renamed, including
>declaration, definition and references;
>5.
>
>Code formatting, based on `clang-format` that respects our coding
>standard using the `.clang-format` and `.clang-format-ignore` files.
> Format
>can be performed on an entire file or on a code selection;
>6.
>
>Inline parsing errors with limited auto-fix hints;
>
>
>1.
>
>Basic static-code analysis using `clang-tidy` and our list of enabled
>checkers. (This is still in progress not all checkers are supported by
>`clangd`);
>
>
> This new eco-system for code development is supported on all platforms that
> we officially support.
>
> In order to have this setup, download and install `VSCode` and run the
> following command:
>
> ./mach ide vscode
>
> Please file any issues that you might encounter using this setup please as
> blocking bugs to Bug 1662709
> .
>
> I would also like to address many thanks to Jonathan Watt and Botond Ballo,
> without their active support this would not have been made possible.
>
> Many thanks,
>
> Andi, on behalf of the team
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Visual Studio Code integration with `clangd` for C/C++ development

2020-09-10 Thread Andi-Bogdan Postelnicu
TLDR: VSCode users can type `./mach ide vscode` in order to get code
completion, reference navigation, refactoring, reformatting, etc.

Hello all,

VSCode  is a multi-platform
open-source programming editor developed by Microsoft and volunteers. It is
partly built using source-code components but also uses proprietary
Microsoft code. It has support for many programming languages using
extensions.
In the past we had a minimal
 configuration setup
in the tree that reflected the basic extensions
 that
should be used and also some tasks
 that can
be triggered from the editor.

Now, we significantly improved that!

Starting with Bug 1656740
, we’ve added
comprehensive support for C/C++with the help of the `clangd` extension for
Firefox development. Leveraging the `clang` toolchain compiler we now have
support in the IDE for:

   1.

   Syntax highlighting;
   2.

   IntelliSense with comprehensive code completion and suggestion;



   1.

   Go-to definition and Go-to declaration;
   2.

   Find all references
   3.

   Open type hierarchy;
   4.

   Rename symbol, all usages of the symbol will be renamed, including
   declaration, definition and references;
   5.

   Code formatting, based on `clang-format` that respects our coding
   standard using the `.clang-format` and `.clang-format-ignore` files. Format
   can be performed on an entire file or on a code selection;
   6.

   Inline parsing errors with limited auto-fix hints;


   1.

   Basic static-code analysis using `clang-tidy` and our list of enabled
   checkers. (This is still in progress not all checkers are supported by
   `clangd`);


This new eco-system for code development is supported on all platforms that
we officially support.

In order to have this setup, download and install `VSCode` and run the
following command:

./mach ide vscode

Please file any issues that you might encounter using this setup please as
blocking bugs to Bug 1662709
.

I would also like to address many thanks to Jonathan Watt and Botond Ballo,
without their active support this would not have been made possible.

Many thanks,

Andi, on behalf of the team
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform