Skip to content

Commit

Permalink
feat(submodule): remove git submodule (#66)
Browse files Browse the repository at this point in the history
- copy the protobuf from spark3.5 release
- update cargo.toml
  • Loading branch information
sjrusso8 authored Jul 22, 2024
1 parent 1284830 commit 676e893
Show file tree
Hide file tree
Showing 12 changed files with 3,131 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust-version.workspace = true
include = [
"build.rs",
"src/**/*",
"spark/connector/connect/common/src/main/protobuf/spark/**/*",
"protobuf/**/*",
]

[dependencies]
Expand Down
7 changes: 2 additions & 5 deletions core/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fs;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let files = fs::read_dir("./spark/connector/connect/common/src/main/protobuf/spark/connect")?;
let files = fs::read_dir("./protobuf/spark-3.5/spark/connect/")?;

let mut file_paths: Vec<String> = vec![];

Expand All @@ -20,10 +20,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.build_server(false)
.build_client(true)
.build_transport(transport)
.compile(
file_paths.as_ref(),
&["./spark/connector/connect/common/src/main/protobuf"],
)?;
.compile(file_paths.as_ref(), &["./protobuf/spark-3.5/"])?;

Ok(())
}
25 changes: 25 additions & 0 deletions core/protobuf/spark-3.5/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# 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.
#
version: v1
breaking:
use:
- FILE
except:
- FILE_SAME_GO_PACKAGE
lint:
use:
- DEFAULT
Loading

0 comments on commit 676e893

Please sign in to comment.