Switch to `lock` instead of `try_lock`
@@ -115,7 +115,7 @@ where
/// Returns the compiled information from the root package
pub fn compile(&mut self) -> Result<Package> {
let lock = NamedLock::create("gleam-compile").expect("Could not lock build directory");
- let _lock_guard = lock.try_lock().expect("Could not lock build directory");
+ let _lock_guard = lock.lock().expect("Could not lock build directory");
self.check_gleam_version()?;
self.compile_dependencies()?;
