forked from apache/thrift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JensG: added testcase for THRIFT-5794 + reverted most of the changes
---- netstd: tests: also run tests with "net8" option of thrift-compiler Add a project which is a copy of the PublicInterfaces.Compile.Tests, but use the "net8" compiler option to generate code that uses C#12-features. Use the thrift-files from the existing test, to avoid code-duplication. This is effectively the tests that are run till v0.20.0. netstd: use default CSharp-language level of compiler instead of using Net8/C#12 for PublicInterfaces.Compile.Tests netstd: update readme for local building netstd: tests: include .exe extension, when looking for compiler It will not be found without this and causes na error and abort. netstd: tests: make MSBuild ignore errors when thrift-binary is not found and continue search Windows copmmand "where" errors when thrift-binary is not found in PATH. This will cause MSBuild to abort instead of searching in alternative paths. So just ignore potential erros and make it go on. Adapt this also for Unix "which", so we don't need to suppress the returncode.
- Loading branch information
1 parent
5b9ae5e
commit 64bb8ce
Showing
7 changed files
with
124 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift5794-net6.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
// Testcase for THRIFT-5794 uncompilable code generated w/o net8 option | ||
|
||
namespace * Thrift5794.net6 | ||
|
||
struct foo { | ||
1: double a; | ||
2: double b; | ||
3: double c; | ||
} | ||
|
||
struct bar { | ||
1: required double a; | ||
2: required double b; | ||
3: double c; | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift5794-net8.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
// Testcase for THRIFT-5794 uncompilable code generated w/o net8 option | ||
|
||
namespace * Thrift5794.net8 | ||
|
||
struct foo { | ||
1: double a; | ||
2: double b; | ||
3: double c; | ||
} | ||
|
||
struct bar { | ||
1: required double a; | ||
2: required double b; | ||
3: double c; | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift5794-netstd.thrift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
// Testcase for THRIFT-5794 uncompilable code generated w/o net8 option | ||
|
||
namespace * Thrift5794.netstd | ||
|
||
struct foo { | ||
1: double a; | ||
2: double b; | ||
3: double c; | ||
} | ||
|
||
struct bar { | ||
1: required double a; | ||
2: required double b; | ||
3: double c; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters