You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/03/14 16:45:00 UTC
[jira] [Commented] (AVRO-2157) IDL compiler won't accept the word
"schema" in namespace-qualified type references
[ https://issues.apache.org/jira/browse/AVRO-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398859#comment-16398859 ]
ASF subversion and git services commented on AVRO-2157:
-------------------------------------------------------
Commit 5c270dad2a281f4e70fb8c8a657d93a0cc72b7a8 in avro's branch refs/heads/master from [~cutting]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=5c270da ]
Merge pull request #295 from psocratic/jira-avro-2157
AVRO-2157: Permit 'schema' in IDL namespaces.
> IDL compiler won't accept the word "schema" in namespace-qualified type references
> ----------------------------------------------------------------------------------
>
> Key: AVRO-2157
> URL: https://issues.apache.org/jira/browse/AVRO-2157
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.8.1, 1.8.2
> Environment: I have produced the error in Ubuntu 16.04, with Java 1.8.0_151, using both the avro-maven-plugin, as well as by modifying the test files in the apache/avro/lang/compiler test suite.
>
> Reporter: Max Englander
> Assignee: Max Englander
> Priority: Trivial
>
> The following IDL will not compile:
>
> {code:java}
> @namespace("org.avro.example.protocol")
> protocol TwoByteSender {
> import schema "../schema/twobytes.avsc";
> record TwoByteReq {
> org.avro.example.schema.TwoBytes twobyte;
> }
> void send(org.avro.example.schema.TwoBytes twobyte);
> void sendReq(TwoByteReq req);
> }{code}
> (The code below, *twobytes.avsc*, compiles without issue, and is included for completeness.)
>
> {code:java}
> {
> "name": "TwoBytes",
> "namespace": "org.avro.example.schema",
> "size": "2",
> "type": "fixed"
> }{code}
> The error thrown by the compiler is:
> {noformat}
> org.apache.avro.compiler.idl.ParseException: Encountered " "schema" "schema "" at line 34, column 14.
> Was expecting one of:
> "array" ...
> "boolean" ...
> "double" ...
> "enum" ...
> "error" ...
> {noformat}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)