Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--watch and --hot on windows #8607

Merged
merged 35 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8e90358
draft impl of windows watcher
gvilums Jan 27, 2024
62a110c
synchronous watcher
gvilums Jan 27, 2024
d94a602
working standalone watcher
gvilums Jan 27, 2024
d45213d
in progress changes to watcher
gvilums Jan 29, 2024
ce043e4
make watcher non-global
gvilums Jan 29, 2024
04c7495
prepare watcher for windows impl
gvilums Jan 29, 2024
102fe00
add windows watcher scaffold and clean up imports
gvilums Jan 29, 2024
e1f0905
fix inotify
gvilums Jan 29, 2024
502440c
make watch code more generic over platforms
gvilums Jan 30, 2024
c039678
fix visibility
gvilums Jan 30, 2024
81db517
watcher starts without error
gvilums Jan 30, 2024
b1d097a
printing changes works
gvilums Jan 30, 2024
04501a3
basic windows watching works
gvilums Jan 31, 2024
497aa7b
handle process exit from watcher
gvilums Jan 31, 2024
835c890
cleanup in process cloning
gvilums Jan 31, 2024
2dd75e4
clean up logging and panic handling
gvilums Jan 31, 2024
65a1dfb
fix hot reload test on windows
gvilums Jan 31, 2024
200c6a5
misc cleanup around watcher
gvilums Jan 31, 2024
297863b
make watch test actually useful
gvilums Jan 31, 2024
3d477ab
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 31, 2024
5ee49a3
remove old files
gvilums Jan 31, 2024
efcd4ab
Merge branch 'georgijs/watcher' of https://github.com/oven-sh/bun int…
gvilums Jan 31, 2024
ba3a262
clean up watchers
gvilums Feb 1, 2024
edcdcfa
update .gitignore
gvilums Feb 1, 2024
e90a314
Merge remote-tracking branch 'origin/main' into georgijs/watcher
gvilums Feb 1, 2024
afb9204
rework windows watcher into single watcher instance watching top leve…
gvilums Feb 1, 2024
d27a65a
use non-strict utf16 conversion
gvilums Feb 1, 2024
c26498e
change to contains
gvilums Feb 1, 2024
642b9ff
fix mac and linux compile
gvilums Feb 1, 2024
152bdde
add baseline in crash report (#8606)
paperdave Feb 1, 2024
f00556e
allow linking bins that do not exist. (#8605)
paperdave Feb 1, 2024
7b00e58
fix linux compile
gvilums Feb 1, 2024
7374005
fix linux compile (again)
gvilums Feb 1, 2024
abb2a5d
remove outdated todo
gvilums Feb 1, 2024
7314e06
Merge branch 'main' into georgijs/watcher
gvilums Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
331 changes: 166 additions & 165 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,166 +1,167 @@
.DS_Store
zig-cache
packages/*/*.wasm
*.o
*.a
profile.json

node_modules
.envrc
.swcrc
yarn.lock
dist
*.tmp
*.log
*.out.js
*.out.refresh.js
**/package-lock.json
build
*.wat
zig-out
pnpm-lock.yaml
README.md.template
src/deps/zig-clap/example
src/deps/zig-clap/README.md
src/deps/zig-clap/.github
src/deps/zig-clap/.gitattributes
out
outdir

.trace
cover
coverage
coverv
*.trace
github
out.*
out
.parcel-cache
esbuilddir
*.bun
parceldist
esbuilddir
outdir/
outcss
.next
txt.js
.idea
.vscode/cpp*
.vscode/clang*

node_modules_*
*.jsb
*.zip
bun-zigld
bun-singlehtreaded
bun-nomimalloc
bun-mimalloc
examples/lotta-modules/bun-yday
examples/lotta-modules/bun-old
examples/lotta-modules/bun-nofscache

src/node-fallbacks/out/*
src/node-fallbacks/node_modules
sign.json
release/
*.dmg
sign.*.json
packages/debug-*
packages/bun-cli/postinstall.js
packages/bun-*/bun
packages/bun-*/bun-profile
packages/bun-*/debug-bun
packages/bun-*/*.o
packages/bun-cli/postinstall.js

packages/bun-cli/bin/*
bun-test-scratch
misctools/fetch

src/deps/libiconv
src/deps/openssl
src/tests.zig
*.blob
src/deps/s2n-tls
.npm
.npm.gz

bun-binary

src/deps/PLCrashReporter/

*.dSYM
*.crash
misctools/sha
packages/bun-wasm/*.mjs
packages/bun-wasm/*.cjs
packages/bun-wasm/*.map
packages/bun-wasm/*.js
packages/bun-wasm/*.d.ts
packages/bun-wasm/*.d.cts
packages/bun-wasm/*.d.mts
*.bc

src/fallback.version
src/runtime.version
*.sqlite
*.database
*.db
misctools/machbench
*.big
.eslintcache

/bun-webkit

src/deps/c-ares/build
src/bun.js/bindings-obj
src/bun.js/debug-bindings-obj

failing-tests.txt
test.txt
myscript.sh

cold-jsc-start
cold-jsc-start.d

/test.ts
/test.js

src/js/out/modules*
src/js/out/functions*
src/js/out/tmp
src/js/out/DebugPath.h

make-dev-stats.csv

.uuid
tsconfig.tsbuildinfo

test/js/bun/glob/fixtures
*.lib
*.pdb
CMakeFiles
build.ninja
.ninja_deps
.ninja_log
CMakeCache.txt
cmake_install.cmake
compile_commands.json

*.lib
x64
**/*.vcxproj*
**/*.sln*
**/*.dir
**/*.pdb

/.webkit-cache
/.cache
/src/deps/libuv
/build-*/

.vs

**/.verdaccio-db.json
/test-report.md
.DS_Store
zig-cache
packages/*/*.wasm
*.o
*.a
profile.json

node_modules
.envrc
.swcrc
yarn.lock
dist
*.tmp
*.log
*.out.js
*.out.refresh.js
**/package-lock.json
build
*.wat
zig-out
pnpm-lock.yaml
README.md.template
src/deps/zig-clap/example
src/deps/zig-clap/README.md
src/deps/zig-clap/.github
src/deps/zig-clap/.gitattributes
out
outdir

.trace
cover
coverage
coverv
*.trace
github
out.*
out
.parcel-cache
esbuilddir
*.bun
parceldist
esbuilddir
outdir/
outcss
.next
txt.js
.idea
.vscode/cpp*
.vscode/clang*

node_modules_*
*.jsb
*.zip
bun-zigld
bun-singlehtreaded
bun-nomimalloc
bun-mimalloc
examples/lotta-modules/bun-yday
examples/lotta-modules/bun-old
examples/lotta-modules/bun-nofscache

src/node-fallbacks/out/*
src/node-fallbacks/node_modules
sign.json
release/
*.dmg
sign.*.json
packages/debug-*
packages/bun-cli/postinstall.js
packages/bun-*/bun
packages/bun-*/bun-profile
packages/bun-*/debug-bun
packages/bun-*/*.o
packages/bun-cli/postinstall.js

packages/bun-cli/bin/*
bun-test-scratch
misctools/fetch

src/deps/libiconv
src/deps/openssl
src/tests.zig
*.blob
src/deps/s2n-tls
.npm
.npm.gz

bun-binary

src/deps/PLCrashReporter/

*.dSYM
*.crash
misctools/sha
packages/bun-wasm/*.mjs
packages/bun-wasm/*.cjs
packages/bun-wasm/*.map
packages/bun-wasm/*.js
packages/bun-wasm/*.d.ts
packages/bun-wasm/*.d.cts
packages/bun-wasm/*.d.mts
*.bc

src/fallback.version
src/runtime.version
*.sqlite
*.database
*.db
misctools/machbench
*.big
.eslintcache

/bun-webkit

src/deps/c-ares/build
src/bun.js/bindings-obj
src/bun.js/debug-bindings-obj

failing-tests.txt
test.txt
myscript.sh

cold-jsc-start
cold-jsc-start.d

/testdir
/test.ts
/test.js

src/js/out/modules*
src/js/out/functions*
src/js/out/tmp
src/js/out/DebugPath.h

make-dev-stats.csv

.uuid
tsconfig.tsbuildinfo

test/js/bun/glob/fixtures
*.lib
*.pdb
CMakeFiles
build.ninja
.ninja_deps
.ninja_log
CMakeCache.txt
cmake_install.cmake
compile_commands.json

*.lib
x64
**/*.vcxproj*
**/*.sln*
**/*.dir
**/*.pdb

/.webkit-cache
/.cache
/src/deps/libuv
/build-*/

.vs

**/.verdaccio-db.json
/test-report.md
/test-report.json
2 changes: 2 additions & 0 deletions src/__global.zig
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ pub fn setThreadName(name: StringTypes.stringZ) void {
_ = std.os.prctl(.SET_NAME, .{@intFromPtr(name.ptr)}) catch 0;
} else if (Environment.isMac) {
_ = std.c.pthread_setname_np(name);
} else if (Environment.isWindows) {
// _ = std.os.SetThreadDescription(std.os.GetCurrentThread(), name);
}
}

Expand Down
12 changes: 4 additions & 8 deletions src/bun.js/event_loop.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1178,14 +1178,10 @@ pub const EventLoop = struct {
}

if (!loop.isActive()) {
if (comptime Environment.isWindows) {
bun.todo(@src(), {});
} else {
if (this.forever_timer == null) {
var t = uws.Timer.create(loop, this);
t.set(this, &noopForeverTimer, 1000 * 60 * 4, 1000 * 60 * 4);
this.forever_timer = t;
}
if (this.forever_timer == null) {
var t = uws.Timer.create(loop, this);
t.set(this, &noopForeverTimer, 1000 * 60 * 4, 1000 * 60 * 4);
this.forever_timer = t;
}
}

Expand Down
Loading
Loading