* [PATCH] c++tools : Add a simple handler for ModuleCompiledRequest.
@ 2021-08-18 19:13 Iain Sandoe
2021-09-09 16:15 ` Jason Merrill
0 siblings, 1 reply; 3+ messages in thread
From: Iain Sandoe @ 2021-08-18 19:13 UTC (permalink / raw)
To: GCC Patches
Hi,
I have found it useful when working with modules stuff to have the completed
set of command/responses available (some people working with the interfaces
for more sophisticated tools are using them). This message is a hand-shake
telling the server that a CMI has been built, and for the simplistic server
implementation doesn’t need to do anything.
This just replies with "OK”.
Tested on x86_64-darwin.
OK for master?
thanks
Iain
c++tools/ChangeLog:
* resolver.cc (module_resolver::ModuleCompiledRequest):
Add a simple handler.
* resolver.h: Declare handler for ModuleCompiledRequest.
---
c++tools/resolver.cc | 7 +++++++
c++tools/resolver.h | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc
index edd4624b121..f862161095d 100644
--- a/c++tools/resolver.cc
+++ b/c++tools/resolver.cc
@@ -307,3 +307,10 @@ module_resolver::IncludeTranslateRequest (Cody::Server *s, Cody::Flags,
return 0;
}
+int
+module_resolver::ModuleCompiledRequest (Cody::Server *s, Cody::Flags,
+ std::string &)
+{
+ s->OKResponse();
+ return 0;
+}
diff --git a/c++tools/resolver.h b/c++tools/resolver.h
index b2f4381b4fa..c1ce9564e7f 100644
--- a/c++tools/resolver.h
+++ b/c++tools/resolver.h
@@ -96,6 +96,10 @@ public:
std::string &include)
override;
+ using parent::ModuleCompiledRequest;
+ virtual int ModuleCompiledRequest (Cody::Server *s, Cody::Flags Flags,
+ std::string &Module) override;
+
private:
using parent::GetCMISuffix;
virtual char const *GetCMISuffix () override;
--
2.24.3 (Apple Git-128)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] c++tools : Add a simple handler for ModuleCompiledRequest.
2021-08-18 19:13 [PATCH] c++tools : Add a simple handler for ModuleCompiledRequest Iain Sandoe
@ 2021-09-09 16:15 ` Jason Merrill
2021-09-14 18:19 ` Iain Sandoe
0 siblings, 1 reply; 3+ messages in thread
From: Jason Merrill @ 2021-09-09 16:15 UTC (permalink / raw)
To: Iain Sandoe, GCC Patches
On 8/18/21 3:13 PM, Iain Sandoe wrote:
> Hi,
>
> I have found it useful when working with modules stuff to have the completed
> set of command/responses available (some people working with the interfaces
> for more sophisticated tools are using them). This message is a hand-shake
> telling the server that a CMI has been built, and for the simplistic server
> implementation doesn’t need to do anything.
>
> This just replies with "OK”.
>
> Tested on x86_64-darwin.
> OK for master?
> thanks
> Iain
>
> c++tools/ChangeLog:
>
> * resolver.cc (module_resolver::ModuleCompiledRequest):
> Add a simple handler.
> * resolver.h: Declare handler for ModuleCompiledRequest.
> ---
> c++tools/resolver.cc | 7 +++++++
> c++tools/resolver.h | 4 ++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc
> index edd4624b121..f862161095d 100644
> --- a/c++tools/resolver.cc
> +++ b/c++tools/resolver.cc
> @@ -307,3 +307,10 @@ module_resolver::IncludeTranslateRequest (Cody::Server *s, Cody::Flags,
> return 0;
> }
Could use a comment here. OK with that added.
> +int
> +module_resolver::ModuleCompiledRequest (Cody::Server *s, Cody::Flags,
> + std::string &)
> +{
> + s->OKResponse();
> + return 0;
> +}
> diff --git a/c++tools/resolver.h b/c++tools/resolver.h
> index b2f4381b4fa..c1ce9564e7f 100644
> --- a/c++tools/resolver.h
> +++ b/c++tools/resolver.h
> @@ -96,6 +96,10 @@ public:
> std::string &include)
> override;
>
> + using parent::ModuleCompiledRequest;
> + virtual int ModuleCompiledRequest (Cody::Server *s, Cody::Flags Flags,
> + std::string &Module) override;
> +
> private:
> using parent::GetCMISuffix;
> virtual char const *GetCMISuffix () override;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] c++tools : Add a simple handler for ModuleCompiledRequest.
2021-09-09 16:15 ` Jason Merrill
@ 2021-09-14 18:19 ` Iain Sandoe
0 siblings, 0 replies; 3+ messages in thread
From: Iain Sandoe @ 2021-09-14 18:19 UTC (permalink / raw)
To: Jason Merrill; +Cc: GCC Patches
> On 9 Sep 2021, at 17:15, Jason Merrill <jason@redhat.com> wrote:
>
> On 8/18/21 3:13 PM, Iain Sandoe wrote:
>> Hi,
>> I have found it useful when working with modules stuff to have the completed
>> set of command/responses available (some people working with the interfaces
>> for more sophisticated tools are using them). This message is a hand-shake
>> telling the server that a CMI has been built, and for the simplistic server
>> implementation doesn’t need to do anything.
>> This just replies with "OK”.
>> Tested on x86_64-darwin.
>> OK for master?
>> thanks
>> Iain
>> c++tools/ChangeLog:
>> * resolver.cc (module_resolver::ModuleCompiledRequest):
>> Add a simple handler.
>> * resolver.h: Declare handler for ModuleCompiledRequest.
>> ---
>> c++tools/resolver.cc | 7 +++++++
>> c++tools/resolver.h | 4 ++++
>> 2 files changed, 11 insertions(+)
>> diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc
>> index edd4624b121..f862161095d 100644
>> --- a/c++tools/resolver.cc
>> +++ b/c++tools/resolver.cc
>> @@ -307,3 +307,10 @@ module_resolver::IncludeTranslateRequest (Cody::Server *s, Cody::Flags,
>> return 0;
>> }
>
> Could use a comment here. OK with that added.
this is what I pushed,
thanks
Iain
[PATCH] c++tools : Add a simple handler for ModuleCompiledRequest.
This just replies with "OK".
c++tools/ChangeLog:
* resolver.cc (module_resolver::ModuleCompiledRequest):
Add a simple handler.
* resolver.h: Declare handler for ModuleCompiledRequest.
---
c++tools/resolver.cc | 11 +++++++++++
c++tools/resolver.h | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc
index edd4624b121..421fdaa55fe 100644
--- a/c++tools/resolver.cc
+++ b/c++tools/resolver.cc
@@ -307,3 +307,14 @@ module_resolver::IncludeTranslateRequest (Cody::Server *s, Cody::Flags,
return 0;
}
+/* This handles a client notification to the server that a CMI has been
+ produced for a module. For this simplified server, we just accept
+ the transaction and respond with "OK". */
+
+int
+module_resolver::ModuleCompiledRequest (Cody::Server *s, Cody::Flags,
+ std::string &)
+{
+ s->OKResponse();
+ return 0;
+}
diff --git a/c++tools/resolver.h b/c++tools/resolver.h
index b2f4381b4fa..c1ce9564e7f 100644
--- a/c++tools/resolver.h
+++ b/c++tools/resolver.h
@@ -96,6 +96,10 @@ public:
std::string &include)
override;
+ using parent::ModuleCompiledRequest;
+ virtual int ModuleCompiledRequest (Cody::Server *s, Cody::Flags Flags,
+ std::string &Module) override;
+
private:
using parent::GetCMISuffix;
virtual char const *GetCMISuffix () override;
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-14 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 19:13 [PATCH] c++tools : Add a simple handler for ModuleCompiledRequest Iain Sandoe
2021-09-09 16:15 ` Jason Merrill
2021-09-14 18:19 ` Iain Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).