aboutsummaryrefslogtreecommitdiff
path: root/src/cache.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-02 11:51:52 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-02 11:51:52 -0700
commit2fa09f7c09d48ac74049fd60231cd4a3a2764a31 (patch)
tree2bf645774a18710b2435e24dea4bde91cb17cbd5 /src/cache.zig
parent47c660f2e1438d76682b59ae84592e7e03639878 (diff)
downloadbun-2fa09f7c09d48ac74049fd60231cd4a3a2764a31.tar.gz
bun-2fa09f7c09d48ac74049fd60231cd4a3a2764a31.tar.zst
bun-2fa09f7c09d48ac74049fd60231cd4a3a2764a31.zip
Fix UMD, fix PNPM, importing require'd modules in app code
Former-commit-id: 3d831ad95904d2123964f2ebccff48f1e9f954e9
Diffstat (limited to '')
-rw-r--r--src/cache.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cache.zig b/src/cache.zig
index 533e35a38..c2e56e6c8 100644
--- a/src/cache.zig
+++ b/src/cache.zig
@@ -73,7 +73,7 @@ pub fn NewCache(comptime cache_files: bool) type {
) !Entry {
var rfs = _fs.fs;
- if (cache_files) {
+ if (comptime cache_files) {
{
c.mutex.lock();
defer c.mutex.unlock();
@@ -138,7 +138,7 @@ pub fn NewCache(comptime cache_files: bool) type {
.fd = if (FeatureFlags.store_file_descriptors) file_handle.handle else 0,
};
- if (cache_files) {
+ if (comptime cache_files) {
c.mutex.lock();
defer c.mutex.unlock();
var res = c.entries.getOrPut(path) catch unreachable;
@@ -163,7 +163,7 @@ pub fn NewCache(comptime cache_files: bool) type {
) !Entry {
var rfs = _fs.fs;
- if (cache_files) {
+ if (comptime cache_files) {
{
c.mutex.lock();
defer c.mutex.unlock();
@@ -228,7 +228,7 @@ pub fn NewCache(comptime cache_files: bool) type {
.fd = if (FeatureFlags.store_file_descriptors) file_handle.handle else 0,
};
- if (cache_files) {
+ if (comptime cache_files) {
c.mutex.lock();
defer c.mutex.unlock();
var res = c.entries.getOrPut(path) catch unreachable;