Closed Bug 1454628 Opened 3 years ago Closed 3 years ago

"mozilla/a11y/IPCTypes.h(10): fatal error C1083: Cannot open include file: 'mozilla/a11y/Role.h': No such file or directory" with --disable-accessibility


(Core :: Disability Access APIs, defect)

Not set



Tracking Status
firefox61 --- fixed


(Reporter: RyanVM, Assigned: Alex_Gaynor)




(1 file)

No description provided.
Flags: needinfo?(agaynor)
Can you include the full error log? (Hoping to see where IPCTypes.h is being included from)
Flags: needinfo?(agaynor) → needinfo?(ryanvm)
Ok, here's the hard chain:

 2:32.23 In file included from /Users/agaynor/projects/mozilla-central/obj-x86_64-apple-darwin17.5.0/ipc/ipdl/UnifiedProtocols11.cpp:38:
 2:32.23 In file included from /Users/agaynor/projects/mozilla-central/obj-x86_64-apple-darwin17.5.0/ipc/ipdl/PDocAccessible.cpp:12:
 2:32.23 /Users/agaynor/projects/mozilla-central/obj-x86_64-apple-darwin17.5.0/ipc/ipdl/_ipdlheaders/mozilla/a11y/PDocAccessible.h:20:10: fatal error: 'mozilla/a11y/Role.h' file not found
 2:32.23 #include "mozilla/a11y/Role.h"
 2:32.23          ^~~~~~~~~~~~~~~~~~~~~
 2:32.23 1 error generated.

PDocAccessible uses a11y::Role, but Role is defined in accessible/base/Role.h, which isn't built in disable-accessibility builds.

aklotz, I don't know how this code is put together very well. Bug 1453979 was simply trying to use the defined enum in the protocols where it's used, but I hadn't realized how disable-accessibility builds interacted with it. Do you have any suggestion for how to resolve?
Flags: needinfo?(ryanvm) → needinfo?(aklotz)
I'd suggest declaring a11y::Role as a dummy type when ACCESSIBILITY is not defined.

Take a look at accessible/ipc/IPCTypes.h for an example.
Flags: needinfo?(aklotz)
Comment on attachment 8968598 [details]
Bug 1454628 - fixed compilation with --disable-accessibility builds;

::: accessible/ipc/IPCTypes.h:21
(Diff revision 1)
>  struct ParamTraits<mozilla::a11y::role>
>    : public ContiguousEnumSerializerInclusive<mozilla::a11y::role,
>                                               mozilla::a11y::role::NOTHING,
>                                               mozilla::a11y::role::LAST_ROLE>
>  {
>  };

Nit: Please add a blank line between the end of the template specialization and the end of the namespace.

::: accessible/ipc/IPCTypes.h:22
(Diff revision 1)
>    : public ContiguousEnumSerializerInclusive<mozilla::a11y::role,
>                                               mozilla::a11y::role::NOTHING,
>                                               mozilla::a11y::role::LAST_ROLE>
>  {
>  };
>  };

Nit: You don't need a semicolon when closing the namespace.

::: accessible/ipc/IPCTypes.h:27
(Diff revision 1)
>  };
> +#else
> +namespace mozilla {
> +namespace a11y {
> +typedef uint32_t role;
> +}

Can you please add comments indicating which namespace each closing brace corresponds to?


} // namespace a11y
Attachment #8968598 - Flags: review?(aklotz) → review+
Keywords: checkin-needed
Assignee: nobody → agaynor
Pushed by
fixed compilation with --disable-accessibility builds; r=aklotz
Keywords: checkin-needed
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.