Skip to content

Commit

Permalink
[idl] Move .bond files to separate idl directory
Browse files Browse the repository at this point in the history
- Separate .bond IDL files from language binding implementations.
- Convert comm IDL files to use C++-style naming convention.

Closes #219
  • Loading branch information
Chad Walters authored and lalo committed Aug 15, 2016
1 parent 8544ae9 commit e359106
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 15 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ different versioning scheme, following the Haskell community's
## Unreleased ##

* `gbc` & compiler library: TBD (major bump needed)
* IDL core version: 1.0 (first release)
* IDL comm version: 1.0 (first release)
* C++ version: TBD (minor bump needed)
* C# NuGet version: TBD (minor bump needed)
* C# Comm NuGet version: TBD (minor bump needed due to dependencies)
Expand Down Expand Up @@ -42,6 +44,17 @@ different versioning scheme, following the Haskell community's
the same name, generated C++ would contain ambiguous references.
[Issue #202](https://github.com/Microsoft/bond/issues/202)

### IDL core ###

* Set up a separate IDL directory so that IDL is independent of language
bindings. [Pull request #219](https://github.com/Microsoft/bond/pull/219)

### IDL comm ###

* Set up a separate IDL directory so that IDL is independent of language
bindings. Convert comm IDL files to use C++-style naming convention. [Pull
request #219](https://github.com/Microsoft/bond/pull/219)

### C++ ###

* Improvements in the `nullable` implementation. [Pull request #174](https://github.com/Microsoft/bond/pull/174)
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set (CMAKE_MODULE_PATH

enable_testing()

set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl)
set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc)
set (BOND_PYTHON_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/python/inc)
set (BOND_GENERATED ${CMAKE_CURRENT_SOURCE_DIR}/cpp/generated)
Expand Down
2 changes: 1 addition & 1 deletion cmake/Bond.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function (add_bond_codegen)
else()
endif()
list (APPEND options --output-dir="${outputDir}")
list (APPEND options --import-dir="${BOND_INCLUDE}")
list (APPEND options --import-dir="${BOND_IDL}")
foreach (dir ${arg_IMPORT_DIR})
list(APPEND options --import-dir="${dir}")
endforeach()
Expand Down
6 changes: 4 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set (sources
${BOND_INCLUDE}/bond/core/bond.bond
${BOND_INCLUDE}/bond/core/bond_const.bond)
${BOND_IDL}/bond/core/bond.bond
${BOND_IDL}/bond/core/bond_const.bond)

add_bond_codegen (${sources}
ENUM_HEADER
Expand Down Expand Up @@ -72,4 +72,6 @@ install (TARGETS bond bond_apply
ARCHIVE DESTINATION lib/bond
INCLUDES DESTINATION include)

install (DIRECTORY ${BOND_IDL}/bond/core/ DESTINATION include/bond/core)

add_subdirectory (test)
2 changes: 1 addition & 1 deletion cs/build/internal/Common.Internal.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
</PropertyGroup>
<PropertyGroup>
<BOND_INCLUDE_PATH Condition="'$(BOND_INCLUDE_PATH)' == ''">$(MSBuildThisFileDirectory)..\..\..\cpp\inc</BOND_INCLUDE_PATH>
<BOND_INCLUDE_PATH Condition="'$(BOND_INCLUDE_PATH)' == ''">$(MSBuildThisFileDirectory)..\..\..\idl</BOND_INCLUDE_PATH>
</PropertyGroup>
<Import Project="..\nuget\Common.props" />
<PropertyGroup Condition="'$(BuildFramework)' == ''">
Expand Down
4 changes: 2 additions & 2 deletions cs/nuget/bond.compiler.csharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
files in this package. They're pretty small. -->

<file src="cs\tools\gbc.exe" target="tools" />
<file src="cpp\inc\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="cpp\inc\bond\core\bond_const.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond_const.bond" target="tools\inc\bond\core" />

<file src="cs\build\nuget\Bond.Compiler.CSharp.targets" target="build\net45" />
<file src="cs\build\nuget\Bond.Compiler.CSharp.props" target="build\net45" />
Expand Down
4 changes: 2 additions & 2 deletions cs/nuget/bond.compiler.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</metadata>
<files>
<file src="cs\tools\gbc.exe" target="tools" />
<file src="cpp\inc\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="cpp\inc\bond\core\bond_const.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond_const.bond" target="tools\inc\bond\core" />
</files>
</package>
4 changes: 2 additions & 2 deletions cs/nuget/bond.csharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</metadata>
<files>
<file src="cs\tools\gbc.exe" target="tools\" />
<file src="cpp\inc\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="cpp\inc\bond\core\bond_const.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond.bond" target="tools\inc\bond\core" />
<file src="idl\bond\core\bond_const.bond" target="tools\inc\bond\core" />
<file src="cs\build\nuget\Bond.CSharp.targets" target="build" />
<file src="cs\build\nuget\Bond.CSharp.props" target="build" />
<file src="cs\build\nuget\Common.props" target="build" />
Expand Down
4 changes: 2 additions & 2 deletions cs/src/comm/epoxy-transport/epoxy-transport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
<Compile Include="EpoxyListener.cs" />
<Compile Include="EpoxyProtocol.cs" />
<Compile Include="EpoxyTransport.cs" />
<BondCodegen Include="EpoxyTransport.bond">
<BondCodegen Include="$(MSBuildThisFileDirectory)\..\..\..\..\idl\bond\comm\epoxy_transport.bond">
<Options>--namespace=bond.comm=Bond.Comm --namespace=bond.comm.epoxy=Bond.Comm.Epoxy</Options>
</BondCodegen>
<!-- Resharper Workaround -->
<Compile Include="$(IntermediateOutputPath)\EpoxyTransport_types.cs" Condition="False" />
<Compile Include="$(IntermediateOutputPath)\epoxy_transport_types.cs" Condition="False" />
<Compile Include="ResponseMap.cs" />
<!-- End Resharper Workaround -->
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions cs/src/comm/interfaces/interfaces.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<Compile Include="properties\AssemblyInfo.cs" />
<Compile Include="Transport.cs" />
<Compile Include="TransportException.cs" />
<BondCodegen Include="Comm.bond">
<BondCodegen Include="$(MSBuildThisFileDirectory)\..\..\..\..\idl\bond\comm\comm.bond">
<Options>--namespace=bond.comm=Bond.Comm</Options>
</BondCodegen>
<!-- Resharper Workaround -->
<Compile Include="$(IntermediateOutputPath)\Comm_types.cs" Condition="False" />
<Compile Include="$(IntermediateOutputPath)\comm_types.cs" Condition="False" />
<!-- End Resharper Workaround -->
</ItemGroup>
<ItemGroup>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

import "Comm.bond"
import "comm.bond"

namespace bond.comm.epoxy;

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit e359106

Please sign in to comment.