Skip to content

Commit 755682e

Browse files
try out simple include
1 parent ed8a956 commit 755682e

2 files changed

Lines changed: 27 additions & 26 deletions

File tree

.github/workflows/build_and_publish.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25-
- name: Patch chrono usage
26-
if: matrix.os == 'windows-2022'
27-
shell: pwsh
28-
run: |
29-
$f = "src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.cpp"
30-
if (!(Get-Content $f | Select-String -SimpleMatch "<chrono>")) {
31-
(Get-Content $f) | Set-Content $f # touch to ensure CRLF normalized
32-
Add-Content -Path $f -Value "" # no-op; optional
33-
# insert include at top (after existing includes)
34-
$lines = Get-Content $f
35-
$idx = ($lines | Select-String -Pattern "^\s*#include\s+").Count
36-
$out = @()
37-
$injected = $false
38-
foreach ($line in $lines) {
39-
if (-not $injected -and $line -match "^\s*#include\s+") {
40-
$out += $line
41-
continue
42-
}
43-
if (-not $injected) {
44-
$out += "#include <chrono>"
45-
$injected = $true
46-
}
47-
$out += $line
48-
}
49-
$out | Set-Content $f
50-
}
25+
# - name: Patch chrono usage
26+
# if: matrix.os == 'windows-2022'
27+
# shell: pwsh
28+
# run: |
29+
# $f = "src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.cpp"
30+
# if (!(Get-Content $f | Select-String -SimpleMatch "<chrono>")) {
31+
# (Get-Content $f) | Set-Content $f # touch to ensure CRLF normalized
32+
# Add-Content -Path $f -Value "" # no-op; optional
33+
# # insert include at top (after existing includes)
34+
# $lines = Get-Content $f
35+
# $idx = ($lines | Select-String -Pattern "^\s*#include\s+").Count
36+
# $out = @()
37+
# $injected = $false
38+
# foreach ($line in $lines) {
39+
# if (-not $injected -and $line -match "^\s*#include\s+") {
40+
# $out += $line
41+
# continue
42+
# }
43+
# if (-not $injected) {
44+
# $out += "#include <chrono>"
45+
# $injected = $true
46+
# }
47+
# $out += $line
48+
# }
49+
# $out | Set-Content $f
50+
# }
5151

5252
- name: Build wheels
5353
uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3

src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "Parser.h"
99
#include "atn/ATNConfigSet.h"
1010
#include "support/CPPUtils.h"
11+
#include <chrono>
1112

1213
#include "atn/ProfilingATNSimulator.h"
1314

0 commit comments

Comments
 (0)