Skip to content

Commit 0ea5b4e

Browse files
authored
Merge pull request #2546 from finos/fix-windows-build
Update to LLVM 17 & fix Python/Windows build
2 parents fda23d8 + 343c927 commit 0ea5b4e

16 files changed

Lines changed: 83 additions & 67 deletions

File tree

.clang-format

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ AlignConsecutiveMacros:
2727
AcrossComments: false
2828
AlignCompound: false
2929
PadOperators: false
30-
# AlignConsecutiveShortCaseStatements:
31-
# Enabled: false
32-
# AcrossEmptyLines: false
33-
# AcrossComments: false
34-
# AlignCaseColons: false
30+
AlignConsecutiveShortCaseStatements:
31+
Enabled: false
32+
AcrossEmptyLines: false
33+
AcrossComments: false
34+
AlignCaseColons: false
3535
AlignEscapedNewlines: Right
3636
AlignOperands: DontAlign
3737
AlignTrailingComments:
@@ -141,7 +141,7 @@ IntegerLiteralSeparator:
141141
JavaScriptQuotes: Leave
142142
JavaScriptWrapImports: true
143143
KeepEmptyLinesAtTheStartOfBlocks: true
144-
# KeepEmptyLinesAtEOF: false
144+
KeepEmptyLinesAtEOF: false
145145
LambdaBodyIndentation: Signature
146146
LineEnding: LF
147147
MacroBlockBegin: ""
@@ -170,6 +170,7 @@ QualifierAlignment: Leave
170170
ReferenceAlignment: Pointer
171171
ReflowComments: true
172172
RemoveBracesLLVM: false
173+
RemoveParentheses: Leave
173174
RemoveSemicolon: false
174175
RequiresClausePosition: OwnLine
175176
RequiresExpressionIndentation: OuterScope
@@ -187,7 +188,7 @@ SpaceBeforeCaseColon: false
187188
SpaceBeforeCpp11BracedList: false
188189
SpaceBeforeCtorInitializerColon: true
189190
SpaceBeforeInheritanceColon: true
190-
# SpaceBeforeJsonColon: false
191+
SpaceBeforeJsonColon: false
191192
SpaceBeforeParens: ControlStatements
192193
SpaceBeforeParensOptions:
193194
AfterControlStatements: true
@@ -208,12 +209,12 @@ SpacesInContainerLiterals: true
208209
SpacesInLineCommentPrefix:
209210
Minimum: 1
210211
Maximum: -1
211-
# SpacesInParens: Never
212-
# SpacesInParensOptions:
213-
# InCStyleCasts: false
214-
# InConditionalStatements: false
215-
# InEmptyParentheses: false
216-
# Other: false
212+
SpacesInParens: Never
213+
SpacesInParensOptions:
214+
InCStyleCasts: false
215+
InConditionalStatements: false
216+
InEmptyParentheses: false
217+
Other: false
217218
SpacesInSquareBrackets: false
218219
Standard: c++17
219220
StatementAttributeLikeMacros:
@@ -223,7 +224,7 @@ StatementMacros:
223224
- QT_REQUIRE_VERSION
224225
TabWidth: 4
225226
UseTab: Never
226-
# VerilogBreakBetweenInstancePorts: true
227+
VerilogBreakBetweenInstancePorts: true
227228
WhitespaceSensitiveMacros:
228229
- BOOST_PP_STRINGIZE
229230
- CF_SWIFT_NAME

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ jobs:
307307
# Dependencies #
308308
################
309309
################
310-
- name: Install LLVM 16
310+
- name: Install LLVM 17
311311
uses: KyleMayes/install-llvm-action@v1
312312
with:
313-
version: "16"
313+
version: "17"
314314
directory: "./.llvm"
315315

316316
# JS
@@ -462,10 +462,10 @@ jobs:
462462
- name: Checkout
463463
uses: actions/checkout@v3
464464

465-
- name: Install LLVM and Clang
465+
- name: Install LLVM 17
466466
uses: KyleMayes/install-llvm-action@v1
467467
with:
468-
version: "16"
468+
version: "17"
469469
directory: "./.llvm"
470470

471471
##########
@@ -1067,12 +1067,12 @@ jobs:
10671067
# Dependencies #
10681068
################
10691069
################
1070-
- name: Install LLVM and Clang
1071-
uses: KyleMayes/install-llvm-action@v1
1072-
if: false
1073-
with:
1074-
version: "16"
1075-
directory: "./.llvm"
1070+
# - name: Install LLVM 17
1071+
# uses: KyleMayes/install-llvm-action@v1
1072+
# if: false
1073+
# with:
1074+
# version: "17"
1075+
# directory: "./.llvm"
10761076

10771077
# JS
10781078
- name: Install yarn

cpp/perspective/src/cpp/arrow_csv.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ ParseYYYY_MM_DD(const char* s, arrow_vendored::date::year_month_day* out) {
7474
*out = {
7575
arrow_vendored::date::year{year},
7676
arrow_vendored::date::month{month},
77-
arrow_vendored::date::day{day}};
77+
arrow_vendored::date::day{day}
78+
};
7879
return out->ok();
7980
}
8081

@@ -99,7 +100,8 @@ ParseYYYY_DD_MM(const char* s, arrow_vendored::date::year_month_day* out) {
99100
*out = {
100101
arrow_vendored::date::year{year},
101102
arrow_vendored::date::month{month},
102-
arrow_vendored::date::day{day}};
103+
arrow_vendored::date::day{day}
104+
};
103105
return out->ok();
104106
}
105107

@@ -125,7 +127,8 @@ ParseYYYY_D_M(const char* s, arrow_vendored::date::year_month_day* out) {
125127
*out = {
126128
arrow_vendored::date::year{year},
127129
arrow_vendored::date::month{month},
128-
arrow_vendored::date::day{day}};
130+
arrow_vendored::date::day{day}
131+
};
129132
return out->ok();
130133
}
131134

@@ -390,7 +393,8 @@ std::vector<std::shared_ptr<arrow::TimestampParser>> DATE_PARSERS{
390393
arrow::TimestampParser::MakeStrptime("%m/%d/%Y"),
391394
arrow::TimestampParser::MakeStrptime("%d %m %Y"),
392395
// TODO: time type column
393-
arrow::TimestampParser::MakeStrptime("%H:%M:%S.%f")};
396+
arrow::TimestampParser::MakeStrptime("%H:%M:%S.%f")
397+
};
394398

395399
std::vector<std::shared_ptr<arrow::TimestampParser>> DATE_READERS{
396400
std::make_shared<UnixTimestampParser>(),
@@ -402,7 +406,8 @@ std::vector<std::shared_ptr<arrow::TimestampParser>> DATE_READERS{
402406
arrow::TimestampParser::MakeStrptime("%m-%d-%Y"),
403407
arrow::TimestampParser::MakeStrptime("%m/%d/%Y"),
404408
arrow::TimestampParser::MakeStrptime("%d %m %Y"),
405-
arrow::TimestampParser::MakeStrptime("%H:%M:%S.%f")};
409+
arrow::TimestampParser::MakeStrptime("%H:%M:%S.%f")
410+
};
406411

407412
int64_t
408413
parseAsArrowTimestamp(const std::string& input) {

cpp/perspective/src/cpp/computed_function.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,8 @@ const std::string days_of_week[7] = {
975975
"4 Wednesday",
976976
"5 Thursday",
977977
"6 Friday",
978-
"7 Saturday"};
978+
"7 Saturday"
979+
};
979980

980981
const std::string months_of_year[12] = {
981982
"01 January",
@@ -989,7 +990,8 @@ const std::string months_of_year[12] = {
989990
"09 September",
990991
"10 October",
991992
"11 November",
992-
"12 December"};
993+
"12 December"
994+
};
993995

994996
day_of_week::day_of_week(
995997
t_expression_vocab& expression_vocab, bool is_type_validator
@@ -1158,7 +1160,8 @@ tsl::hopscotch_map<char, t_date_bucket_unit> bucket::UNIT_MAP = {
11581160
{'D', t_date_bucket_unit::DAYS},
11591161
{'W', t_date_bucket_unit::WEEKS},
11601162
{'M', t_date_bucket_unit::MONTHS},
1161-
{'Y', t_date_bucket_unit::YEARS}};
1163+
{'Y', t_date_bucket_unit::YEARS}
1164+
};
11621165

11631166
bucket::bucket() : exprtk::igeneric_function<t_tscalar>("T?") {}
11641167

cpp/perspective/src/cpp/date_parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ const std::string t_date_parser::VALID_FORMATS[12] = {
3131
"%m %d %Y",
3232
"%m/%d/%Y",
3333
"%m/%d/%y",
34-
"%d %m %Y"};
34+
"%d %m %Y"
35+
};
3536

3637
t_date_parser::t_date_parser() {}
3738

cpp/perspective/src/cpp/gnode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ t_gnode::t_gnode(t_schema input_schema, t_schema output_schema) :
8282
m_output_schema,
8383
m_output_schema,
8484
trans_schema,
85-
existed_schema};
85+
existed_schema
86+
};
8687
m_epoch = std::chrono::high_resolution_clock::now();
8788
}
8889

cpp/perspective/src/cpp/storage_impl_linux.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ t_lstore::create_file() {
8484
}
8585

8686
void*
87-
t_lstore::create_mapping() const {
87+
// NOLINTNEXTLINE
88+
t_lstore::create_mapping() {
8889
void* rval = mmap(0, capacity(), m_mprot, m_mflags, m_fd, 0);
8990
PSP_VERBOSE_ASSERT(rval != MAP_FAILED, "mmap failed");
9091
return rval;

cpp/perspective/src/cpp/storage_impl_osx.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ t_lstore::create_file() {
8484
}
8585

8686
void*
87-
t_lstore::create_mapping() const {
87+
// NOLINTNEXTLINE
88+
t_lstore::create_mapping() {
8889
void* rval = mmap(nullptr, capacity(), m_mprot, m_mflags, m_fd, 0);
8990
PSP_VERBOSE_ASSERT(rval, != MAP_FAILED, "mmap failed");
9091
return rval;

cpp/perspective/src/cpp/storage_impl_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ t_lstore::create_file() {
9393
}
9494

9595
void*
96-
t_lstore::create_mapping() const {
96+
t_lstore::create_mapping() {
9797
std::pair<std::uint32_t, std::uint32_t> capacity = capacity_pair();
9898

9999
m_winmapping_handle = CreateFileMapping(

cpp/perspective/src/cpp/vendor/arrow_single_threaded_reader.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ namespace csv {
108108
std::shared_ptr<DataType> type
109109
) {
110110
return Column{
111-
std::move(col_name), col_index, false, std::move(type)};
111+
std::move(col_name), col_index, false, std::move(type)
112+
};
112113
}
113114

114115
static Column
@@ -308,7 +309,8 @@ namespace csv {
308309
block_index_++,
309310
is_final,
310311
bytes_skipped,
311-
[](int64_t) { return Status::OK(); }});
312+
[](int64_t) { return Status::OK(); }
313+
});
312314
}
313315
partial_ = std::move(empty);
314316
}
@@ -353,7 +355,8 @@ namespace csv {
353355
block_index_++,
354356
is_final,
355357
bytes_skipped,
356-
std::move(consume_bytes)});
358+
std::move(consume_bytes)
359+
});
357360
}
358361
};
359362

@@ -453,7 +456,8 @@ namespace csv {
453456
}
454457
views = {
455458
std::string_view(*straddling),
456-
std::string_view(*block.buffer)};
459+
std::string_view(*block.buffer)
460+
};
457461
} else {
458462
views = {std::string_view(*block.buffer)};
459463
}
@@ -470,7 +474,8 @@ namespace csv {
470474
return ParsedBlock{
471475
std::move(parser),
472476
block.block_index,
473-
static_cast<int64_t>(parsed_size) + block.bytes_skipped};
477+
static_cast<int64_t>(parsed_size) + block.bytes_skipped
478+
};
474479
}
475480

476481
private:
@@ -736,8 +741,8 @@ namespace csv {
736741
);
737742
}
738743
views = {
739-
std::string_view(*straddling),
740-
std::string_view(*block)};
744+
std::string_view(*straddling), std::string_view(*block)
745+
};
741746
} else {
742747
views = {std::string_view(*block)};
743748
}
@@ -751,7 +756,8 @@ namespace csv {
751756
num_rows_seen_ += parser->total_num_rows();
752757
}
753758
return ParseResult{
754-
std::move(parser), static_cast<int64_t>(parsed_size)};
759+
std::move(parser), static_cast<int64_t>(parsed_size)
760+
};
755761
}
756762

757763
io::IOContext io_context_;

0 commit comments

Comments
 (0)