diff --git a/AGENTS.md b/AGENTS.md index dd12ac12..8fce3892 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,9 +4,9 @@ Guidance for coding agents working in this repository. ## Project -Buzz is a small/lightweight statically typed scripting language written in Zig. +buzz is a small/lightweight statically typed scripting language written in Zig. -Main Buzz implementation subsystems: +Main buzz implementation subsystems: - Scanner: `src/Scanner.zig` - Parser and AST: `src/Parser.zig`, `src/Ast.zig` @@ -75,21 +75,21 @@ Run formatter tests: zig build test ``` -`zig build test` currently tests the Buzz formatter. `zig build test-behavior` is the most important test suite for language behavior. +`zig build test` currently tests the buzz formatter. `zig build test-behavior` is the most important test suite for language behavior. -Run a single Buzz file containing `test` blocks: +Run a single buzz file containing `test` blocks: ```sh -zig build run -- -t tests/behavior/descriptive-name.buzz +zig build run -- test tests/behavior/descriptive-name.buzz ``` -Run a regular Buzz script with a `main` function: +Run a regular buzz script with a `main` function: ```sh -zig build run -- path/to/file.buzz +zig build run -- run path/to/file.buzz ``` -Prefer `zig build run` because it builds Buzz and then runs the script. Do not bother setting `BUZZ_PATH` manually. +Prefer `zig build run` because it builds buzz and then runs the script. Do not bother setting `BUZZ_PATH` manually. Check Zig formatting: @@ -104,7 +104,7 @@ Only Zig files need formatting checks for now. - If Zig code was touched, run `zig build` before finishing. - For language behavior changes, run `zig build test-behavior`. - For formatter changes, run `zig build test`. -- For focused behavior work, first run the relevant file with `zig build run -- -t `, then run the broader suite when appropriate. +- For focused behavior work, first run the relevant file with `zig build run -- test `, then run the broader suite when appropriate. - Tests are not expected to be flaky or platform-specific. - Supported platforms are macOS and Linux. Do not spend effort on Windows compatibility unless explicitly asked. - Do not test WASM unless the task is specifically WASM-related. @@ -116,11 +116,12 @@ Only Zig files need formatting checks for now. - Every language feature or bug fix should include a behavior test unless there is a clear reason not to. - Parser, typechecker, compiler, and crash fixes should include a reduced regression test when possible. - Do not add fuzzed crashes yourself. -- Tests that intentionally trigger a Buzz compile error belong in `tests/compile_errors/`. -- Compile-error tests must have a first-line comment containing the expected Buzz error message. +- Tests that intentionally trigger a buzz compile error belong in `tests/compile_errors/`. +- Compile-error tests must have a first-line comment containing the expected buzz error message. ## Style +- Always write uncapitalized buzz and not Buzz - Keep patches minimal and localized. - Preserve existing naming and conventions, even if they look inconsistent, unless the task is specifically cleanup. - Do not break logic into small functions unless those small functions are used more than once. @@ -129,15 +130,15 @@ Only Zig files need formatting checks for now. - Comments are encouraged for compiler/runtime logic, but keep them concise and useful. - Any non-trivial code added must be properly commented in the code. Comments should explain intent, invariants, or tricky control flow, not restate obvious assignments. - Any new Zig file under `src/` must start with a file docblock (`//! ...`) describing the general role of the file. -- Any new functions, structs, objects, properties, and enums introduced in Zig or Buzz code must have a docblock. -- When modifying of creating a buzz file, always reformat it with `buzz -f` +- Any new functions, structs, objects, properties, and enums introduced in Zig or buzz code must have a docblock. +- When modifying of creating a buzz file, always reformat it with `buzz format` ## Runtime And GC Rules - Strings and types are interned. - Strings generally come from `gc.copyString`. - Types generally come from `gc.type_registry.getTypeDef`. -- When doing work while the VM is running, temporary Buzz objects must be pushed on the stack so they are not collected by the GC. +- When doing work while the VM is running, temporary buzz objects must be pushed on the stack so they are not collected by the GC. ## JIT And Debug Flags @@ -174,5 +175,5 @@ The matrix writes timings and output-hash comparisons under `zig-cache/jit-bench - For parser/typechecker/codegen issues, prefer the smallest `.buzz` regression test that reproduces the behavior. - For VM or GC issues, check object lifetime and stack rooting before changing collection behavior. - For JIT issues, compare behavior with JIT enabled and disabled before changing JIT code. -- For FFI issues, be careful with pointer lifetimes and ownership across the Zig/Buzz boundary. +- For FFI issues, be careful with pointer lifetimes and ownership across the Zig/buzz boundary. - If a change may affect performance, mention that in the final response when relevant, but do not run benchmarks unless explicitly asked. diff --git a/CHANGELOG.md b/CHANGELOG.md index 302e0142..561eb18a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,12 @@ This release brings a lot of useful tools to write buzz code: LSP, formatter and - Windows support (https://github.com/buzz-language/buzz/issues/74) - First working version of a LSP thanks to [lsp-kit](https://github.com/zigtools/lsp-kit) (https://github.com/buzz-language/buzz/issues/16) - First working version of the debugger that implements the [Debugger Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) thanks to [buzz-language/dap-kit](https://github.com/buzz-language/dap-kit) (https://github.com/buzz-language/buzz/issues/88) -- Code formatter (`buzz --fmt`) (https://github.com/buzz-language/buzz/issues/96) +- Code formatter (`buzz format`) (https://github.com/buzz-language/buzz/issues/96) +- Package manager (https://github.com/buzz-language/buzz/issues/85) + - Package manifests with `manifest.buzz` and the new `buzz:manifest` std lib definitions + - Package scaffolding with `buzz init` + - Dependency fetching with `buzz fetch`, supporting git repositories, archives and local directories + - `manifest.lock.buzz` lock files with resolved refs and dependency content hashes - `match` statement/expression for value matching with type-specific condition semantics (https://github.com/buzz-language/buzz/issues/80) - Enum name can be omitted if it can be inferred (`final list: [Locale] = [ .fr, .it, .en ]`) (https://github.com/buzz-language/buzz/issues/360) - Object initialization name can be omitted if it can be inferred (`final payload: Payload = .{ data "..." };`) (https://github.com/buzz-language/buzz/issues/373) @@ -25,15 +30,27 @@ This release brings a lot of useful tools to write buzz code: LSP, formatter and ## Changed +- buzz binary now uses subcommands rather than options + - `buzz ` becomes `buzz run-script ` + - `buzz -t ` becomes `buzz test ` + - `buzz -f ` becomes `buzz format ` + - `buzz run` runs `src/main.buzz` from the current package + - `buzz init` and `buzz fetch` manage package scaffolding and dependencies + - `buzz` will start the REPL - Extern libraries now must expose only one function which will be called by the compiler to lookup the functions of the library - `int` are now `i48` instead of `i32` (https://github.com/buzz-language/buzz/issues/306). If you're wondering why, it's because all buzz values live in a NaN boxed f64 and the maximum bits available for an integer in there is 48. However, C ABI does not understand `i48` so we're still stuck with `i32` in FFI for now. - `main` signature can omit `args` argument - Maximum number of enum cases is now 16 777 215 instead of 255 - `pattern.matchAgainst` returns now a list of `obj{ start: int, end: int, capture: str }` and `matchAllAgainst` a list of those lists -- Selective import erases the imported namespace: `import print from "std"; ... print("hello world");` -- Common part of imported namespace gets erased: il imported file as namesapce `a\b\c` and importing script has namespace `a\b`, only `c\` remains - Tuples no longer require free form identifier to access their properties: `tuple.@"0"` can now be `tuple.0` +### Imports +- Import do rely on searchers any more, instead the import path provides a deterministic way of finding the imported script + - `buzz:` will look for a buzz's standard library `` + - `pkg:/path/to/` will look for the script under `vendors//src/path/to/` +- Selective import erases the imported namespace: `import print from "buzz:std"; ... print("hello world");` +- Common part of imported namespace gets erased: il imported file as namesapce `a\b\c` and importing script has namespace `a\b`, only `c\` remains + ## Internal - JIT compiler works in a separate thread diff --git a/build.zig b/build.zig index 1bd943f6..ec3b9ada 100644 --- a/build.zig +++ b/build.zig @@ -674,10 +674,6 @@ fn buildTestLibraries( foreign_lib.getEmittedBin(), b.pathJoin(&.{ "tests", "utils", foreign_lib.out_filename }), ); - copy_test_libs.addCopyFileToSource( - hello_lib.getEmittedBin(), - hello_lib.out_filename, - ); copy_test_libs.addCopyFileToSource( hello_lib.getEmittedBin(), b.pathJoin(&.{ "tests", "utils", hello_lib.out_filename }), diff --git a/examples/2048.buzz b/examples/2048.buzz index 0b4111ed..3caca894 100644 --- a/examples/2048.buzz +++ b/examples/2048.buzz @@ -25,10 +25,10 @@ // trying a move that doesn't change the board. // - Win condition. // - Lose condition. -import "std"; -import "io"; -import "errors"; -import "os"; +import "buzz:std"; +import "buzz:io"; +import "buzz:errors"; +import "buzz:os"; object Pair { srcX: int, diff --git a/examples/fibonacci.buzz b/examples/fibonacci.buzz index b0234243..00ddef52 100644 --- a/examples/fibonacci.buzz +++ b/examples/fibonacci.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun fibonacci(n: int) > void *> int? { var n1 = 0; diff --git a/examples/fizzbuzz.buzz b/examples/fizzbuzz.buzz index 938bd049..88c0cb37 100644 --- a/examples/fizzbuzz.buzz +++ b/examples/fizzbuzz.buzz @@ -1,6 +1,6 @@ namespace examples\fizzbuzz; -import "std"; +import "buzz:std"; fun fizzBuzz(n: int) > str { final fizz = n % 3 == 0; diff --git a/examples/game-of-life.buzz b/examples/game-of-life.buzz index bc264dd1..d66f302e 100644 --- a/examples/game-of-life.buzz +++ b/examples/game-of-life.buzz @@ -1,6 +1,6 @@ -import "std"; -import "io"; -import "examples/sdl-wrapped" as _; +import "buzz:std"; +import "buzz:io"; +import "sdl-wrapped" as _; /// buzz -L/path/to/SDL2.dylib/so/dll examples/game-of-life.buzz object World { diff --git a/examples/sdl-wrapped.buzz b/examples/sdl-wrapped.buzz index e146fecb..a63b2bd5 100644 --- a/examples/sdl-wrapped.buzz +++ b/examples/sdl-wrapped.buzz @@ -1,7 +1,7 @@ namespace sdl; -import "std"; -import "ffi"; +import "buzz:std"; +import "buzz:ffi"; zdef("SDL2", ` const SDL_Window = opaque{}; diff --git a/examples/sdl.buzz b/examples/sdl.buzz index a68ee9af..f997cbb8 100644 --- a/examples/sdl.buzz +++ b/examples/sdl.buzz @@ -1,4 +1,4 @@ -import "examples/sdl-wrapped" as _; +import "sdl-wrapped" as _; /// buzz -L/path/to/SDL2.dylib/so/dll examples/sdl.buzz fun main() > int !> SDLError { diff --git a/examples/sqlite.buzz b/examples/sqlite.buzz index 5a49ccc9..eb689bf6 100644 --- a/examples/sqlite.buzz +++ b/examples/sqlite.buzz @@ -1,10 +1,10 @@ namespace sqlite; -import "ffi"; -import "std"; -import "buffer"; -import "serialize" as _; -import "errors"; +import "buzz:ffi"; +import "buzz:std"; +import "buzz:buffer"; +import "buzz:serialize" as _; +import "buzz:errors"; zdef( "sqlite3", diff --git a/examples/voronoi-diagram.buzz b/examples/voronoi-diagram.buzz index 57fbf116..0c45bf90 100644 --- a/examples/voronoi-diagram.buzz +++ b/examples/voronoi-diagram.buzz @@ -1,6 +1,6 @@ -import "std"; -import "examples/sdl-wrapped" as _; -import "math"; +import "buzz:std"; +import "sdl-wrapped" as _; +import "buzz:math"; fun hypot(x: int, y: int) > int { return std\toInt( diff --git a/src/Debugger.zig b/src/Debugger.zig index f2471e32..e6b15e0e 100644 --- a/src/Debugger.zig +++ b/src/Debugger.zig @@ -532,6 +532,7 @@ pub fn launch(self: *Debugger, arguments: Arguments(.launch)) Error!Response(.la // While debugger is active, the program won't start right away _ = self.session.?.runner.runFile( + null, program, &.{}, // TODO ) catch return error.LaunchFailed; diff --git a/src/Package.zig b/src/Package.zig new file mode 100644 index 00000000..f8a42f91 --- /dev/null +++ b/src/Package.zig @@ -0,0 +1,2537 @@ +const std = @import("std"); +const Runner = @import("Runner.zig"); +const o = @import("obj.zig"); +const builtin = @import("builtin"); +const bzio = @import("io.zig"); +const v = @import("value.zig"); + +/// Standard package manifest filename. +pub const MANIFEST = "manifest.buzz"; +/// Standard package manifest lock filename. +pub const MANIFEST_LOCK = "manifest.lock.buzz"; +pub const VENDORS = "vendors"; +const manifest_wrapper_prefix = "import \"buzz:manifest\" as _;final manifest: Manifest = "; +const manifest_lock_wrapper_prefix = "import \"buzz:manifest\" as _;final manifestLock: ManifestLock = "; +const input_whitespace = " \n\r\t"; + +fn exists(io: std.Io, path: []const u8) bool { + std.Io.Dir.cwd().access(io, path, .{ .read = true }) catch { + return false; + }; + + return true; +} + +/// Fully resolved package source recorded in `manifest.lock.buzz`. +pub const ResolvedSource = struct { + /// Original source URL or local path. + url: []const u8, + /// Git ref, tag, or commit used to fetch the source. + ref: ?[]const u8, + /// SHA-256 content hash of the fetched package tree. + hash: []const u8, + + /// Parses a `ResolvedSource` buzz object value. + pub fn fromValue(value: v.Value) ResolvedSource { + const instance = value.obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + + return .{ + .url = instance.get([]const u8, "url"), + .ref = instance.get(?[]const u8, "ref"), + .hash = instance.get([]const u8, "hash"), + }; + } + + /// Fetches this locked source and verifies its content hash. + pub fn fetch( + self: ResolvedSource, + process: std.process.Init, + allocator: std.mem.Allocator, + root_dir: []const u8, + name: []const u8, + progress: *InitProgress, + ) !FetchResult { + const result = try Manifest.Source.fetchResolved( + process, + allocator, + root_dir, + name, + self.url, + self.ref, + progress, + ); + errdefer allocator.free(result.destination); + defer allocator.free(result.resolved_source.hash); + + if (!std.mem.eql(u8, result.resolved_source.hash, self.hash)) { + return error.ManifestLockHashMismatch; + } + + return .{ + .destination = result.destination, + .downloaded = result.downloaded, + .resolved_source = self, + }; + } +}; + +/// Parsed `manifest.lock.buzz` content. +pub const ManifestLock = struct { + /// Locked regular dependencies by package name. + dependencies: std.StringHashMapUnmanaged(ResolvedSource) = .empty, + /// Locked development dependencies by package name. + dev_dependencies: std.StringHashMapUnmanaged(ResolvedSource) = .empty, + + /// Parses a `ManifestLock` buzz object value. + pub fn fromValue(value: v.Value, allocator: std.mem.Allocator) !ManifestLock { + const instance = value.obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + + const dependencies = instance.getFieldValue("dependencies").obj().cast(o.ObjMap, .Map).?; + var dep_list = std.StringHashMapUnmanaged(ResolvedSource).empty; + var it = dependencies.map.iterator(); + while (it.next()) |entry| { + try dep_list.put( + allocator, + entry.key_ptr.*.obj().cast(o.ObjString, .String).?.string, + .fromValue(entry.value_ptr.*), + ); + } + + const dev_dependencies = instance.getFieldValue("devDependencies").obj().cast(o.ObjMap, .Map).?; + var dev_dep_list = std.StringHashMapUnmanaged(ResolvedSource).empty; + it = dev_dependencies.map.iterator(); + while (it.next()) |entry| { + try dev_dep_list.put( + allocator, + entry.key_ptr.*.obj().cast(o.ObjString, .String).?.string, + .fromValue(entry.value_ptr.*), + ); + } + + return .{ + .dependencies = dep_list, + .dev_dependencies = dev_dep_list, + }; + } + + /// Serializes the lock file as deterministic bare buzz object source. + pub fn toSource(self: ManifestLock, allocator: std.mem.Allocator) ![]const u8 { + var source = std.ArrayList(u8).empty; + errdefer source.deinit(allocator); + + try source.appendSlice(allocator, ".{\n"); + try appendLockMap(allocator, &source, "dependencies", self.dependencies); + try appendLockMap(allocator, &source, "devDependencies", self.dev_dependencies); + try source.appendSlice(allocator, "}\n"); + + return try source.toOwnedSlice(allocator); + } + + /// Writes the lock file at `path`. + pub fn write(self: ManifestLock, io: std.Io, allocator: std.mem.Allocator, path: []const u8) !void { + const source = try self.toSource(allocator); + defer allocator.free(source); + + const parent = std.fs.path.dirname(path) orelse "."; + const basename = std.fs.path.basename(path); + var dir = if (std.fs.path.isAbsolute(parent)) + try std.Io.Dir.openDirAbsolute(io, parent, .{}) + else + try std.Io.Dir.cwd().openDir(io, parent, .{}); + defer dir.close(io); + + try dir.writeFile(io, .{ + .sub_path = basename, + .data = source, + }); + } +}; + +/// Result of fetching a dependency source into the vendors directory. +const FetchResult = struct { + /// Directory where the package source exists after the fetch attempt. + destination: []const u8, + /// Whether this call populated `destination`. + downloaded: bool, + /// Source data to persist in the lock file. + resolved_source: ResolvedSource, +}; + +/// Path and kind for one deterministic package hash input. +const HashEntry = struct { + /// Path relative to the hashed package directory. + path: []const u8, + /// Filesystem kind to distinguish files from symlinks. + kind: std.Io.File.Kind, + + /// Sorts hash entries by path for stable hashing. + fn lessThan(_: void, lhs: HashEntry, rhs: HashEntry) bool { + return std.mem.lessThan(u8, lhs.path, rhs.path); + } +}; + +/// Must match src/lib/manifest.buzz +pub const Manifest = struct { + name: []const u8, + version: std.SemanticVersion, + source: Source, + dependencies: std.StringHashMapUnmanaged(Source) = .empty, + dev_dependencies: std.StringHashMapUnmanaged(Source) = .empty, + build: std.StringArrayHashMapUnmanaged(BuildStep) = .empty, + root_dir: []const u8 = "src", + description: ?[]const u8 = null, + authors: [][]const u8 = &.{}, + tags: [][]const u8 = &.{}, + license: ?[]const u8 = null, + homepage: ?[]const u8 = null, + + /// One process invocation from a manifest build step. + pub const BuildCommand = []const []const u8; + + /// Ordered commands attached to one named manifest build step. + pub const BuildStep = []const BuildCommand; + + pub fn fetch(self: Manifest, process: std.process.Init, root_dir: []const u8) !bool { + const started_at = std.Io.Clock.Timestamp.now(process.io, .awake); + var stdout = bzio.stdoutWriter(process.io); + + const count = self.dependencies.count() + self.dev_dependencies.count(); + if (count == 0) { + stdout.interface.writeAll("👨‍🚀 Nothing to do\n\n") catch {}; + } + + stdout.interface.writeAll("👨‍🚀 Fetching dependencies...\n\n") catch {}; + + var arena = std.heap.ArenaAllocator.init(process.gpa); + defer arena.deinit(); + const allocator = arena.allocator(); + + const lock_path = try std.fs.path.join( + allocator, + &.{ root_dir, MANIFEST_LOCK }, + ); + var manifest_lock = if (exists(process.io, lock_path)) + try loadManifestLock(process, allocator, lock_path) + else + ManifestLock{}; + var lock_dirty = false; + + var progress = InitProgress{ + .out = &stdout.interface, + .total = count, + }; + progress.tick("fetching dependencies") catch {}; + + var failed = std.ArrayList(struct { package: []const u8, err: []const u8 }).empty; + defer failed.deinit(allocator); + + var deps = self.dependencies.iterator(); + while (deps.next()) |entry| { + var errors = std.ArrayList([]const u8).empty; + defer errors.deinit(allocator); + + fetchDependency( + entry.value_ptr.*, + process, + allocator, + root_dir, + entry.key_ptr.*, + &manifest_lock.dependencies, + &lock_dirty, + &progress, + &errors, + ) catch |err| { + try failed.append( + allocator, + .{ + .package = entry.key_ptr.*, + .err = @errorName(err), + }, + ); + + for (errors.items) |step_err| { + try failed.append(allocator, .{ + .package = entry.key_ptr.*, + .err = step_err, + }); + } + }; + + progress.advance(entry.key_ptr.*) catch {}; + } + + deps = self.dev_dependencies.iterator(); + while (deps.next()) |entry| { + var errors = std.ArrayList([]const u8).empty; + defer errors.deinit(allocator); + + fetchDependency( + entry.value_ptr.*, + process, + allocator, + root_dir, + entry.key_ptr.*, + &manifest_lock.dev_dependencies, + &lock_dirty, + &progress, + &errors, + ) catch |err| { + try failed.append( + allocator, + .{ + .package = entry.key_ptr.*, + .err = @errorName(err), + }, + ); + + for (errors.items) |step_err| { + try failed.append(allocator, .{ + .package = entry.key_ptr.*, + .err = step_err, + }); + } + }; + + progress.advance(entry.key_ptr.*) catch {}; + } + + if (failed.items.len == 0 and lock_dirty) { + try manifest_lock.write(process.io, allocator, lock_path); + } + + progress.finish() catch {}; + + const elapsed = started_at.untilNow(process.io).raw; + if (failed.items.len > 0) { + stdout.interface.print( + "\n⛔ {} packages could not be fetched in {f}.\n\n", + .{ + failed.items.len, + elapsed, + }, + ) catch {}; + + for (failed.items) |failure| { + stdout.interface.print( + "\t\x1b[31m{s}: {s}\x1b[0m\n", + .{ + failure.package, + failure.err, + }, + ) catch {}; + } + + stdout.interface.writeByte('\n') catch {}; + } else { + stdout.interface.print( + "\n🎉 {} packages fetched in {f}.\n\n", + .{ + count, + elapsed, + }, + ) catch {}; + } + + return failed.items.len == 0; + } + + /// Fetches a dependency and runs its manifest build commands when newly downloaded. + fn fetchDependency( + source: Source, + process: std.process.Init, + allocator: std.mem.Allocator, + root_dir: []const u8, + name: []const u8, + lock_entries: *std.StringHashMapUnmanaged(ResolvedSource), + lock_dirty: *bool, + progress: *InitProgress, + errors: *std.ArrayList([]const u8), + ) !void { + const fetched = if (lock_entries.get(name)) |locked| fetched: { + try source.validateLock(locked); + break :fetched try locked.fetch( + process, + allocator, + root_dir, + name, + progress, + ); + } else fetched: { + const result = try source.fetch( + process, + allocator, + root_dir, + name, + progress, + ); + try lock_entries.put(allocator, name, result.resolved_source); + lock_dirty.* = true; + + break :fetched result; + }; + + if (!fetched.downloaded) { + return; + } + + const manifest_path = try std.fs.path.join( + allocator, + &.{ fetched.destination, MANIFEST }, + ); + defer allocator.free(manifest_path); + + const dependency_manifest = try loadManifest( + process, + allocator, + manifest_path, + ); + + var build_command_count: usize = 0; + var steps = dependency_manifest.build.iterator(); + while (steps.next()) |step| { + build_command_count += step.value_ptr.*.len; + } + progress.total += build_command_count; + + steps = dependency_manifest.build.iterator(); + while (steps.next()) |step| { + for (step.value_ptr.*) |command| { + if (command.len == 0) { + return error.EmptyBuildCommand; + } + + { + const result = try runCommand( + process, + allocator, + command, + fetched.destination, + progress, + step.key_ptr.*, + ); + defer result.deinit(allocator); + + progress.advance(step.key_ptr.*) catch {}; + + if (result.exit_code == null or result.exit_code.? != 0) { + var err = std.Io.Writer.Allocating.init(allocator); + + err.writer.print( + "\x1b[31mFailed build step {s} for package {s}:\n\t{s}\n\x1b[0m", + .{ + step.key_ptr.*, + name, + result.stderr, + }, + ) catch {}; + + try errors.append(allocator, try err.toOwnedSlice()); + + return error.BuildCommandFailed; + } + } + } + } + } + + /// Captured result of a spawned external command. + const CommandResult = struct { + /// Captured standard output owned by the caller. + stdout: []u8, + /// Captured standard error owned by the caller. + stderr: []u8, + /// Exit code when the command terminated normally. + exit_code: ?u8, + + /// Releases captured output buffers. + fn deinit(self: CommandResult, allocator: std.mem.Allocator) void { + allocator.free(self.stdout); + allocator.free(self.stderr); + } + }; + + /// Runs `argv` in `cwd`, captures output, and keeps `progress` animated while the command is alive. + fn runCommand( + process: std.process.Init, + allocator: std.mem.Allocator, + argv: []const []const u8, + cwd: []const u8, + progress: *InitProgress, + label: []const u8, + ) !CommandResult { + const output_limit = 1024 * 1024; + const tick_timeout: std.Io.Timeout = .{ + .duration = .{ + .clock = .awake, + .raw = .fromMilliseconds(80), + }, + }; + + var child = try std.process.spawn(process.io, .{ + .argv = argv, + .cwd = .{ .path = cwd }, + .stdin = .ignore, + .stdout = .pipe, + .stderr = .pipe, + }); + errdefer child.kill(process.io); + + var multi_reader_buffer: std.Io.File.MultiReader.Buffer(2) = undefined; + var multi_reader: std.Io.File.MultiReader = undefined; + multi_reader.init( + allocator, + process.io, + multi_reader_buffer.toStreams(), + &.{ child.stdout.?, child.stderr.? }, + ); + defer multi_reader.deinit(); + + const stdout_reader = multi_reader.reader(0); + const stderr_reader = multi_reader.reader(1); + while (true) { + multi_reader.fill(64, tick_timeout) catch |err| switch (err) { + error.Timeout => { + progress.tick(label) catch {}; + + continue; + }, + error.EndOfStream => break, + else => |e| return e, + }; + + if (stdout_reader.buffered().len > output_limit or + stderr_reader.buffered().len > output_limit) + { + return error.StreamTooLong; + } + + progress.tick(label) catch {}; + } + + try multi_reader.checkAnyError(); + + const term = try child.wait(process.io); + const stdout = try multi_reader.toOwnedSlice(0); + errdefer allocator.free(stdout); + const stderr = try multi_reader.toOwnedSlice(1); + errdefer allocator.free(stderr); + + return .{ + .stdout = stdout, + .stderr = stderr, + .exit_code = switch (term) { + .exited => |code| code, + else => null, + }, + }; + } + + pub fn fromValue(value: v.Value, allocator: std.mem.Allocator) !Manifest { + const instance = value.obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + const version = instance.getFieldValue("version").obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + + const dependencies = instance.getFieldValue("dependencies").obj().cast(o.ObjMap, .Map).?; + var dep_list = std.StringHashMapUnmanaged(Source).empty; + var it = dependencies.map.iterator(); + while (it.next()) |entry| { + try dep_list.put( + allocator, + entry.key_ptr.*.obj().cast(o.ObjString, .String).?.string, + .fromValue(entry.value_ptr.*), + ); + } + + const dev_dependencies = instance.getFieldValue("devDependencies").obj().cast(o.ObjMap, .Map).?; + var dev_dep_list = std.StringHashMapUnmanaged(Source).empty; + it = dev_dependencies.map.iterator(); + while (it.next()) |entry| { + try dev_dep_list.put( + allocator, + entry.key_ptr.*.obj().cast(o.ObjString, .String).?.string, + .fromValue(entry.value_ptr.*), + ); + } + + var build = instance.getFieldValue("build").obj().cast(o.ObjMap, .Map).?; + var build_map = std.StringArrayHashMapUnmanaged(BuildStep).empty; + it = build.map.iterator(); + while (it.next()) |entry| { + const cmds = entry.value_ptr.*.obj().cast(o.ObjList, .List).?; + + var cmd_list = std.ArrayList(BuildCommand).empty; + for (cmds.items.items) |cmd| { + const argv = cmd.obj().cast(o.ObjList, .List).?; + var argv_list = std.ArrayList([]const u8).empty; + for (argv.items.items) |item| { + try argv_list.append( + allocator, + item.obj().cast(o.ObjString, .String).?.string, + ); + } + + try cmd_list.append( + allocator, + try argv_list.toOwnedSlice(allocator), + ); + } + + try build_map.put( + allocator, + entry.key_ptr.*.obj().cast(o.ObjString, .String).?.string, + try cmd_list.toOwnedSlice(allocator), + ); + } + + const authors = instance.getFieldValue("authors").obj().cast(o.ObjList, .List).?; + var author_list = std.ArrayList([]const u8).empty; + for (authors.items.items) |author| { + try author_list.append( + allocator, + author.obj().cast(o.ObjString, .String).?.string, + ); + } + + const tags = instance.getFieldValue("tags").obj().cast(o.ObjList, .List).?; + var tag_list = std.ArrayList([]const u8).empty; + for (tags.items.items) |tag| { + try tag_list.append( + allocator, + tag.obj().cast(o.ObjString, .String).?.string, + ); + } + + return .{ + .name = instance.get([]const u8, "name"), + .description = instance.get(?[]const u8, "description"), + .license = instance.get(?[]const u8, "license"), + .homepage = instance.get(?[]const u8, "homepage"), + .authors = try author_list.toOwnedSlice(allocator), + .tags = try tag_list.toOwnedSlice(allocator), + .version = .{ + .major = @intCast(version.get(v.Integer, comptime "0")), + .minor = @intCast(version.get(v.Integer, comptime "1")), + .patch = @intCast(version.get(v.Integer, comptime "2")), + }, + .root_dir = instance.get([]const u8, "rootDir"), + .source = .fromValue(instance.getFieldValue("source")), + .dependencies = dep_list, + .dev_dependencies = dev_dep_list, + .build = build_map, + }; + } + + pub const Source = struct { + url: []const u8, + ref: ?[]const u8, + version: ?std.SemanticVersion = null, + constraint: Constraint = .equalTo, + + /// Fetches this source, resolving version constraints when needed. + pub fn fetch( + self: Source, + process: std.process.Init, + allocator: std.mem.Allocator, + root_dir: []const u8, + name: []const u8, + progress: *InitProgress, + ) !FetchResult { + const resolved_ref = if (self.version != null) + try self.resolveVersionRef(process.io, allocator) + else + self.ref; + + return try fetchResolved( + process, + allocator, + root_dir, + name, + self.url, + resolved_ref, + progress, + ); + } + + /// Fetches a URL/ref pair into the package vendors directory. + fn fetchResolved( + process: std.process.Init, + allocator: std.mem.Allocator, + root_dir: []const u8, + name: []const u8, + url: []const u8, + ref: ?[]const u8, + progress: *InitProgress, + ) !FetchResult { + const io = process.io; + const destination_path = try destinationPath(allocator, root_dir, name); + const downloaded = !exists(io, destination_path); + + if (downloaded) { + try fetchUrl( + process, + allocator, + url, + ref, + destination_path, + progress, + ); + } + + const hash = try hashPackageTree(io, allocator, destination_path); + + return .{ + .destination = destination_path, + .downloaded = downloaded, + .resolved_source = .{ + .url = url, + .ref = ref, + .hash = hash, + }, + }; + } + + /// Returns `/vendors/`. + fn destinationPath(allocator: std.mem.Allocator, root_dir: []const u8, name: []const u8) ![]const u8 { + var destination = std.Io.Writer.Allocating.init(allocator); + defer destination.deinit(); + + destination.writer.print( + "{s}{c}{s}{c}{s}", + .{ + root_dir, + std.Io.Dir.path.sep, + VENDORS, + std.Io.Dir.path.sep, + name, + }, + ) catch return error.OutOfMemory; + + return try allocator.dupe(u8, destination.written()); + } + + fn isGitUrl(url: []const u8) bool { + const query_index = std.mem.indexOfScalar(u8, url, '?') orelse url.len; + const fragment_index = std.mem.indexOfScalar(u8, url, '#') orelse url.len; + const source_path = url[0..@min(query_index, fragment_index)]; + + return std.ascii.startsWithIgnoreCase(url, "git:") or + std.ascii.startsWithIgnoreCase(url, "git@") or + std.ascii.startsWithIgnoreCase(url, "git+") or + std.ascii.startsWithIgnoreCase(url, "ssh://") or + std.ascii.endsWithIgnoreCase(source_path, ".git"); + } + + fn isArchive(url: []const u8) bool { + const query_index = std.mem.indexOfScalar(u8, url, '?') orelse url.len; + const fragment_index = std.mem.indexOfScalar(u8, url, '#') orelse url.len; + const source_path = url[0..@min(query_index, fragment_index)]; + + return std.ascii.endsWithIgnoreCase(source_path, ".tar.gz") or + std.ascii.endsWithIgnoreCase(source_path, ".tgz"); + } + + fn isHttp(url: []const u8) bool { + return std.ascii.startsWithIgnoreCase(url, "http://") or + std.ascii.startsWithIgnoreCase(url, "https://"); + } + + /// Fetches `url_or_path` into `destination`. + fn fetchUrl( + process: std.process.Init, + allocator: std.mem.Allocator, + url_or_path: []const u8, + ref: ?[]const u8, + destination: []const u8, + progress: *InitProgress, + ) !void { + const io = process.io; + const is_http = isHttp(url_or_path); + + if (isArchive(url_or_path)) { + if (ref != null) { + return error.UnsupportedFetchSource; + } + + return try fetchArchive( + io, + allocator, + url_or_path, + destination, + is_http, + ); + } + + if (isGitUrl(url_or_path)) { + return try fetchGit( + process, + allocator, + url_or_path, + ref, + destination, + progress, + ); + } + + if (is_http) { + return error.UnsupportedFetchSource; + } + + if (ref != null) { + return error.UnsupportedFetchSource; + } + + return try fetchDirectory( + io, + allocator, + url_or_path, + destination, + ); + } + + /// Clones a Git source into `destination` and checks out `ref` when provided. + fn fetchGit( + process: std.process.Init, + allocator: std.mem.Allocator, + url_or_path: []const u8, + ref: ?[]const u8, + destination: []const u8, + progress: *InitProgress, + ) !void { + const io = process.io; + + if (std.fs.path.dirname(destination)) |parent| { + if (parent.len > 0) { + try std.Io.Dir.cwd().createDirPath(io, parent); + } + } + + const git_url = if (std.ascii.startsWithIgnoreCase(url_or_path, "git+")) + url_or_path["git+".len..] + else + url_or_path; + + if (ref) |git_ref| { + // Branches and tags can usually be cloned directly at depth 1. + // This is the fastest path and keeps history out of vendors. + const clone_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "clone", "--depth", "1", "--single-branch", "--branch", git_ref, git_url, destination }, + ".", + progress, + destination, + ); + defer clone_result.deinit(allocator); + const clone_succeeded = clone_result.exit_code != null and clone_result.exit_code.? == 0; + + if (!clone_succeeded) { + // `git clone --branch` refuses some valid lock refs, especially raw + // commits. Remove any partial clone, then fetch that exact ref into + // an empty repository at depth 1 instead of doing a full clone. + std.Io.Dir.cwd().deleteTree(io, destination) catch {}; + try std.Io.Dir.cwd().createDirPath(io, destination); + + const init_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "init", destination }, + ".", + progress, + destination, + ); + defer init_result.deinit(allocator); + + if (init_result.exit_code == null or init_result.exit_code.? != 0) { + return error.GitCloneFailed; + } + + const remote_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "-C", destination, "remote", "add", "origin", git_url }, + ".", + progress, + destination, + ); + defer remote_result.deinit(allocator); + + if (remote_result.exit_code == null or remote_result.exit_code.? != 0) { + return error.GitFetchFailed; + } + + const fetch_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "-C", destination, "fetch", "--depth", "1", "origin", git_ref }, + ".", + progress, + destination, + ); + defer fetch_result.deinit(allocator); + + if (fetch_result.exit_code == null or fetch_result.exit_code.? != 0) { + return error.GitFetchFailed; + } + + const checkout_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "-C", destination, "checkout", "--detach", "FETCH_HEAD" }, + ".", + progress, + destination, + ); + defer checkout_result.deinit(allocator); + + if (checkout_result.exit_code == null or checkout_result.exit_code.? != 0) { + return error.GitCheckoutFailed; + } + } + } else { + // Without an explicit ref, clone the remote HEAD at depth 1 + const result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "clone", "--depth", "1", "--single-branch", git_url, destination }, + ".", + progress, + destination, + ); + defer result.deinit(allocator); + + if (result.exit_code == null or result.exit_code.? != 0) { + return error.GitCloneFailed; + } + } + + // This is a no-op for repos without submodules, so avoid a separate + // `.gitmodules` probe and let git populate nested dependencies. + const submodule_result = try Manifest.runCommand( + process, + allocator, + &.{ "git", "-C", destination, "submodule", "update", "--init", "--recursive", "--depth", "1" }, + ".", + progress, + destination, + ); + defer submodule_result.deinit(allocator); + + if (submodule_result.exit_code == null or submodule_result.exit_code.? != 0) { + return error.GitSubmoduleUpdateFailed; + } + } + + /// Downloads a remote archive when needed and extracts it into `destination`. + fn fetchArchive(io: std.Io, allocator: std.mem.Allocator, url_or_path: []const u8, destination: []const u8, is_http: bool) !void { + const archive_path = if (is_http) archive: { + if (std.fs.path.dirname(destination)) |parent| { + if (parent.len > 0) { + try std.Io.Dir.cwd().createDirPath(io, parent); + } + } + + var random_bytes: [8]u8 = undefined; + io.random(&random_bytes); + const temporary_path = try std.fmt.allocPrint( + allocator, + "{s}.download-{x}.tar.gz", + .{ + destination, + std.mem.readInt(u64, &random_bytes, .little), + }, + ); + errdefer allocator.free(temporary_path); + errdefer std.Io.Dir.cwd().deleteFile(io, temporary_path) catch {}; + + var file = try std.Io.Dir.cwd().createFile(io, temporary_path, .{ .exclusive = true }); + defer file.close(io); + + var file_buffer: [16 * 1024]u8 = undefined; + var file_writer = file.writer(io, &file_buffer); + + var client: std.http.Client = .{ + .allocator = allocator, + .io = io, + }; + defer client.deinit(); + + const result = try client.fetch(.{ + .location = .{ .url = url_or_path }, + .response_writer = &file_writer.interface, + }); + try file_writer.interface.flush(); + if (result.status != .ok) { + return error.HttpError; + } + + break :archive temporary_path; + } else url_or_path; + defer if (is_http) { + std.Io.Dir.cwd().deleteFile(io, archive_path) catch {}; + allocator.free(archive_path); + }; + + try std.Io.Dir.cwd().createDirPath(io, destination); + + var destination_dir = try std.Io.Dir.cwd().openDir(io, destination, .{}); + defer destination_dir.close(io); + + var archive_file = try std.Io.Dir.cwd().openFile(io, archive_path, .{ .mode = .read_only }); + defer archive_file.close(io); + + var archive_buffer: [16 * 1024]u8 = undefined; + var archive_reader = archive_file.reader(io, &archive_buffer); + + const inflate_buffer = try allocator.alloc(u8, std.compress.flate.max_window_len); + defer allocator.free(inflate_buffer); + + var gzip = std.compress.flate.Decompress.init( + &archive_reader.interface, + .gzip, + inflate_buffer, + ); + + try std.tar.extract(io, destination_dir, &gzip.reader, .{ + .strip_components = 1, + }); + } + + /// Copies a local directory into `destination`. + fn fetchDirectory(io: std.Io, allocator: std.mem.Allocator, url_or_path: []const u8, destination: []const u8) !void { + try std.Io.Dir.cwd().createDirPath(io, destination); + + var source_dir = std.Io.Dir.cwd().openDir(io, url_or_path, .{ .iterate = true }) catch |err| switch (err) { + error.FileNotFound, error.NotDir => return error.UnsupportedFetchSource, + else => |e| return e, + }; + defer source_dir.close(io); + + var destination_dir = try std.Io.Dir.cwd().openDir(io, destination, .{ .iterate = true }); + defer destination_dir.close(io); + + var walker = try source_dir.walk(allocator); + defer walker.deinit(); + while (try walker.next(io)) |entry| { + switch (entry.kind) { + .directory => try destination_dir.createDirPath(io, entry.path), + .file => try entry.dir.copyFile( + entry.basename, + destination_dir, + entry.path, + io, + .{ + .make_path = true, + .replace = false, + }, + ), + .sym_link => { + var target_buffer: [std.Io.Dir.max_path_bytes]u8 = undefined; + const target_len = try entry.dir.readLink(io, entry.basename, &target_buffer); + const target = target_buffer[0..target_len]; + const stat = entry.dir.statFile(io, entry.basename, .{}) catch null; + + try destination_dir.symLink(io, target, entry.path, .{ + .is_directory = if (stat) |s| s.kind == .directory else false, + }); + }, + else => return error.UnsupportedDirectoryEntry, + } + } + } + + const GitTag = struct { + tag: []const u8, + commit: []const u8, + + pub fn deinit(self: *GitTag, allocator: std.mem.Allocator) void { + allocator.free(self.tag); + allocator.free(self.commit); + } + }; + + /// Lists tags of a git repo, preferring peeled commits for annotated tags. + fn fetchGitTags(io: std.Io, allocator: std.mem.Allocator, url: []const u8) ![]GitTag { + const git_url = if (std.ascii.startsWithIgnoreCase(url, "git+")) + url["git+".len..] + else + url; + + const result = try std.process.run( + allocator, + io, + .{ + .argv = &.{ "git", "ls-remote", "--tags", git_url }, + .stdout_limit = .limited(1024 * 1024), + .stderr_limit = .limited(1024 * 1024), + }, + ); + defer allocator.free(result.stdout); + defer allocator.free(result.stderr); + + switch (result.term) { + .exited => |code| if (code != 0) { + return error.GitLsRemoteFailed; + }, + else => return error.GitLsRemoteFailed, + } + + var tags = std.ArrayList(GitTag).empty; + var lines = std.mem.tokenizeScalar(u8, result.stdout, '\n'); + while (lines.next()) |line| { + if (line.len == 0) continue; + + var columns = std.mem.tokenizeAny(u8, line, " \t"); + const commit = columns.next() orelse continue; + const ref_name = columns.next() orelse continue; + if (!std.mem.startsWith(u8, ref_name, "refs/tags/")) { + continue; + } + + const raw_tag = ref_name["refs/tags/".len..]; + const peeled = std.mem.endsWith(u8, raw_tag, "^{}"); + const tag = if (peeled) raw_tag[0 .. raw_tag.len - 3] else raw_tag; + + for (tags.items) |*existing| { + if (std.mem.eql(u8, existing.tag, tag)) { + if (peeled) { + allocator.free(existing.commit); + existing.commit = try allocator.dupe(u8, commit); + } + + break; + } + } else { + try tags.append( + allocator, + .{ + .commit = try allocator.dupe(u8, commit), + .tag = try allocator.dupe(u8, tag), + }, + ); + } + } + + return try tags.toOwnedSlice(allocator); + } + + /// Resolves this source version constraint to the highest matching semver tag. + fn resolveVersionRef(self: Source, io: std.Io, allocator: std.mem.Allocator) ![]const u8 { + const requested_version = self.version orelse return error.MissingVersionConstraint; + if (!isGitUrl(self.url)) { + return error.UnsupportedVersionConstraint; + } + + const tags = try fetchGitTags(io, allocator, self.url); + defer { + for (tags) |*tag| { + tag.deinit(allocator); + } + allocator.free(tags); + } + + var best_index: ?usize = null; + var best_version: ?std.SemanticVersion = null; + for (tags, 0..) |tag, index| { + const tag_version = parseSemverTag(tag.tag) orelse continue; + if (!self.constraint.matches(requested_version, tag_version)) { + continue; + } + + if (best_version == null or best_version.?.order(tag_version) == .lt) { + best_version = tag_version; + best_index = index; + } + } + + const index = best_index orelse return error.NoMatchingGitTag; + + return try allocator.dupe(u8, tags[index].tag); + } + + /// Validates that a lock entry still matches this manifest source. + fn validateLock(self: Source, locked: ResolvedSource) !void { + if (!std.mem.eql(u8, self.url, locked.url)) { + return error.ManifestLockDrift; + } + + if (self.version) |requested_version| { + const locked_ref = locked.ref orelse return error.ManifestLockDrift; + const locked_version = parseSemverTag(locked_ref) orelse return error.ManifestLockDrift; + if (!self.constraint.matches(requested_version, locked_version)) { + return error.ManifestLockDrift; + } + + return; + } + + if ((self.ref == null and locked.ref != null) or + (self.ref != null and locked.ref == null) or + (self.ref != null and locked.ref != null and + !std.mem.eql(u8, self.ref.?, locked.ref.?))) + { + return error.ManifestLockDrift; + } + } + + pub fn fromValue(value: v.Value) Source { + const instance = value.obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + const version_value = instance.getFieldValue("version"); + const version = if (version_value.isNull()) + null + else + version_value.obj().cast(o.ObjObjectInstance, .ObjectInstance).?; + + return .{ + .url = instance.get([]const u8, "url"), + .ref = instance.get(?[]const u8, "ref"), + .version = if (version) |version_instance| .{ + .major = @intCast(version_instance.get(v.Integer, comptime "1")), + .minor = @intCast(version_instance.get(v.Integer, comptime "2")), + .patch = @intCast(version_instance.get(v.Integer, comptime "3")), + } else null, + .constraint = if (version) |version_instance| + @enumFromInt(@as(u8, @intCast(version_instance.get(v.Integer, "0")))) + else + .equalTo, + }; + } + + pub const Constraint = enum(u8) { + lessThan, + equalOrLessThan, + equalTo, + greaterThan, + equalOrGreater, + majorLessThan, + majorEqualOrLessThan, + majorEqualTo, + majorGreaterThan, + majorEqualOrGreater, + minorLessThan, + minorEqualOrLessThan, + minorEqualTo, + minorGreaterThan, + minorEqualOrGreater, + + /// Checks whether `candidate` satisfies this constraint against `requested`. + fn matches(self: Constraint, requested: std.SemanticVersion, candidate: std.SemanticVersion) bool { + const order = switch (self) { + .lessThan, + .equalOrLessThan, + .equalTo, + .greaterThan, + .equalOrGreater, + => candidate.order(requested), + + .majorLessThan, + .majorEqualOrLessThan, + .majorEqualTo, + .majorGreaterThan, + .majorEqualOrGreater, + => std.math.order(candidate.major, requested.major), + + .minorLessThan, + .minorEqualOrLessThan, + .minorEqualTo, + .minorGreaterThan, + .minorEqualOrGreater, + => minorVersionOrder(candidate, requested), + }; + + return switch (self) { + .lessThan, .majorLessThan, .minorLessThan => order == .lt, + .equalOrLessThan, .majorEqualOrLessThan, .minorEqualOrLessThan => order != .gt, + .equalTo, .majorEqualTo, .minorEqualTo => order == .eq, + .greaterThan, .majorGreaterThan, .minorGreaterThan => order == .gt, + .equalOrGreater, .majorEqualOrGreater, .minorEqualOrGreater => order != .lt, + }; + } + }; + }; +}; + +/// Tracks and prints single-line package operation progress. +const InitProgress = struct { + /// Spinner frames used while rewriting the progress line. + const init_progress_frames = [_][]const u8{ "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }; + + /// Terminal writer used for progress output. + out: *std.Io.Writer, + /// Number of completed work units. + completed: usize = 0, + /// Number of expected work units. + total: usize, + /// Spinner frame to show for the next progress update. + frame: usize = 0, + + /// Redraws the progress display without completing another unit of work. + fn tick(self: *InitProgress, path: []const u8) !void { + try self.out.writeAll("\r\x1b[2K"); + try self.out.print(" {s} {d}/{d} ", .{ + init_progress_frames[self.frame % init_progress_frames.len], + self.completed, + self.total, + }); + self.frame += 1; + + try bzio.printProgressBar( + self.out, + @intCast(self.completed), + @intCast(self.total), + 24, + "\x1b[36m", + ); + try self.out.print(" {s}", .{path}); + try self.out.flush(); + } + + /// Redraws the single-line progress display for a completed work unit. + fn advance(self: *InitProgress, path: []const u8) !void { + self.completed += 1; + + try self.out.writeAll("\r\x1b[2K"); + try self.out.print(" {s} {d}/{d} ", .{ + init_progress_frames[self.frame % init_progress_frames.len], + self.completed, + self.total, + }); + self.frame += 1; + + try bzio.printProgressBar( + self.out, + @intCast(self.completed), + @intCast(self.total), + 24, + "\x1b[36m", + ); + try self.out.print(" {s}", .{path}); + try self.out.flush(); + } + + /// Leaves a final completed progress line before subsequent output. + fn finish(self: *InitProgress) !void { + try self.out.writeAll("\r\x1b[2K"); + try self.out.print(" ✓ {d}/{d} ", .{ + self.completed, + self.total, + }); + try bzio.printProgressBar( + self.out, + @intCast(self.completed), + @intCast(self.total), + 24, + "\x1b[36m", + ); + try self.out.writeAll(" Done\n"); + try self.out.flush(); + } +}; + +/// Wraps a bare package object into typed buzz source. +fn wrapManifestObject( + allocator: std.mem.Allocator, + raw_source: []const u8, + wrapper_prefix: []const u8, +) ![]const u8 { + const source = std.mem.trim(u8, raw_source, " \n\r\t"); + + var manifest_source = std.ArrayList(u8).empty; + // Wrap into a script that will leave the manifest as the last global of the VM + // We type the variable so that if user gives anything else, we get an error + try manifest_source.appendSlice(allocator, wrapper_prefix); + try manifest_source.appendSlice(allocator, source); + + if (!std.mem.endsWith(u8, source, ";")) { + try manifest_source.append(allocator, ';'); + } + + return try manifest_source.toOwnedSlice(allocator); +} + +pub fn wrapManifest(allocator: std.mem.Allocator, raw_source: []const u8) ![]const u8 { + return try wrapManifestObject(allocator, raw_source, manifest_wrapper_prefix); +} + +/// Wraps a bare manifest lock object into valid buzz code. +pub fn wrapManifestLock(allocator: std.mem.Allocator, raw_source: []const u8) ![]const u8 { + return try wrapManifestObject(allocator, raw_source, manifest_lock_wrapper_prefix); +} + +pub fn loadManifest(process: std.process.Init, allocator: std.mem.Allocator, manifest_path: []const u8) !Manifest { + var file = try std.Io.Dir.cwd().openFile( + process.io, + manifest_path, + .{ + .mode = .read_only, + }, + ); + defer file.close(process.io); + + const raw_source = try allocator.alloc(u8, (try file.stat(process.io)).size); + _ = try file.readPositionalAll(process.io, raw_source, 0); + const manifest_source = try wrapManifest(allocator, raw_source); + + var runner: Runner = undefined; + try runner.init( + process, + allocator, // We want the parsed value to outlive this function + .Repl, + null, + null, + ); + + if (try runner.runManifest(manifest_source, "manifest")) |manifest| { + return try .fromValue(manifest, allocator); + } + + return error.ManifestNotProduced; +} + +/// Loads and parses a package lock manifest from disk. +pub fn loadManifestLock(process: std.process.Init, allocator: std.mem.Allocator, manifest_lock_path: []const u8) !ManifestLock { + var file = try std.Io.Dir.cwd().openFile( + process.io, + manifest_lock_path, + .{ + .mode = .read_only, + }, + ); + defer file.close(process.io); + + const raw_source = try allocator.alloc(u8, (try file.stat(process.io)).size); + _ = try file.readPositionalAll(process.io, raw_source, 0); + const manifest_source = try wrapManifestLock(allocator, raw_source); + + var runner: Runner = undefined; + try runner.init( + process, + allocator, // We want the parsed value to outlive this function + .Repl, + null, + null, + ); + + if (try runner.runManifest(manifest_source, "manifestLock")) |manifest_lock| { + return try .fromValue(manifest_lock, allocator); + } + + return error.ManifestLockNotProduced; +} + +/// Ensures `vendors/` points back to the package root. +pub fn ensureSelfVendorSymlink( + process: std.process.Init, + package_root: []const u8, + package_name: []const u8, +) !void { + var root_dir = if (std.fs.path.isAbsolute(package_root)) + try std.Io.Dir.openDirAbsolute(process.io, package_root, .{}) + else + try std.Io.Dir.cwd().openDir(process.io, package_root, .{}); + defer root_dir.close(process.io); + + root_dir.createDir(process.io, VENDORS, .default_dir) catch |err| switch (err) { + error.PathAlreadyExists => {}, + else => return err, + }; + + var vendors_dir = try root_dir.openDir(process.io, VENDORS, .{}); + defer vendors_dir.close(process.io); + + vendors_dir.symLink( + process.io, + "..", + package_name, + .{ .is_directory = true }, + ) catch |err| switch (err) { + error.PathAlreadyExists => {}, + error.AccessDenied => if (builtin.os.tag == .windows) return error.WindowsSymlinkPermission else return err, + else => return err, + }; +} + +/// Writes the complete minimal package scaffold under `package_root` and reports file progress when provided. +fn writePackageFiles( + process: std.process.Init, + allocator: std.mem.Allocator, + package_root: []const u8, + manifest: Manifest, + progress: ?*InitProgress, +) !void { + try ensureSelfVendorSymlink(process, package_root, manifest.name); + + // The manifest is intentionally a bare object: loadManifest wraps it with + // the import and typed assignment needed to validate it as Buzz code. + var root_dir = if (std.fs.path.isAbsolute(package_root)) + try std.Io.Dir.openDirAbsolute(process.io, package_root, .{}) + else + try std.Io.Dir.cwd().openDir(process.io, package_root, .{}); + defer root_dir.close(process.io); + + var optional_manifest_fields = std.ArrayList(u8).empty; + + if (manifest.description) |description| { + try appendOptionalStringField( + allocator, + &optional_manifest_fields, + "description", + description, + ); + } + + if (manifest.authors.len > 0) { + try optional_manifest_fields.appendSlice(allocator, "authors = [ "); + for (manifest.authors, 0..) |author, index| { + if (index > 0) { + try optional_manifest_fields.appendSlice(allocator, ", "); + } + + try appendBuzzStringLiteral(allocator, &optional_manifest_fields, author); + } + try optional_manifest_fields.appendSlice(allocator, " ],\n"); + } + + if (manifest.license) |license| { + try appendOptionalStringField( + allocator, + &optional_manifest_fields, + "license", + license, + ); + } + + if (manifest.tags.len > 0) { + try optional_manifest_fields.appendSlice(allocator, "tags = [ "); + for (manifest.tags, 0..) |tag, index| { + if (index > 0) { + try optional_manifest_fields.appendSlice(allocator, ", "); + } + + try appendBuzzStringLiteral(allocator, &optional_manifest_fields, tag); + } + try optional_manifest_fields.appendSlice(allocator, " ],\n"); + } + + if (manifest.homepage) |homepage| { + try appendOptionalStringField( + allocator, + &optional_manifest_fields, + "homepage", + homepage, + ); + } + + if (!std.mem.eql(u8, manifest.root_dir, "src")) { + try optional_manifest_fields.appendSlice(allocator, "rootDir = "); + try appendBuzzStringLiteral(allocator, &optional_manifest_fields, manifest.root_dir); + try optional_manifest_fields.appendSlice(allocator, ",\n"); + } + + var manifest_source = std.Io.Writer.Allocating.init(allocator); + defer manifest_source.deinit(); + try manifest_source.writer.print( + \\.{{ + \\ name = "{s}", + \\ version = .{{ {}, {}, {} }}, + \\ source = .{{ url = "{s}" }}, + \\ build = {{ + \\ "{s}": [[ "zig", "build" ]], + \\ }}, + \\ + , + .{ + manifest.name, + manifest.version.major, + manifest.version.minor, + manifest.version.patch, + manifest.source.url, + manifest.name, + }, + ); + + var optional_it = std.mem.splitScalar(u8, optional_manifest_fields.items, '\n'); + while (optional_it.next()) |field| { + if (field.len == 0) { + continue; + } + + try manifest_source.writer.print(" {s}\n", .{field}); + } + + try manifest_source.writer.writeAll("}\n"); + try root_dir.writeFile(process.io, .{ + .sub_path = MANIFEST, + .data = manifest_source.written(), + }); + if (progress) |p| { + try p.advance(MANIFEST); + } + + var build_zig = std.Io.Writer.Allocating.init(allocator); + defer build_zig.deinit(); + try build_zig.writer.print( + \\const std = @import("std"); + \\ + \\/// Builds the generated Buzz native example library. + \\pub fn build(b: *std.Build) void {{ + \\ const target = b.standardTargetOptions(.{{}}); + \\ const optimize = b.standardOptimizeOption(.{{}}); + \\ + \\ const lib = b.addLibrary(.{{ + \\ .name = "{s}", + \\ .linkage = .dynamic, + \\ .use_llvm = true, + \\ .root_module = b.createModule(.{{ + \\ .root_source_file = b.path("{s}/{s}.zig"), + \\ .target = target, + \\ .optimize = optimize, + \\ .sanitize_c = .off, + \\ }}), + \\ }}); + \\ + \\ const copy_lib = b.addUpdateSourceFiles(); + \\ copy_lib.addCopyFileToSource(lib.getEmittedBin(), lib.out_filename); + \\ b.getInstallStep().dependOn(©_lib.step); + \\}} + \\ + , + .{ + manifest.name, + manifest.root_dir, + manifest.name, + }, + ); + try root_dir.writeFile(process.io, .{ + .sub_path = "build.zig", + .data = build_zig.written(), + }); + if (progress) |p| { + try p.advance("build.zig"); + } + + try root_dir.createDir(process.io, manifest.root_dir, .default_dir); + var src_dir = try root_dir.openDir(process.io, manifest.root_dir, .{}); + defer src_dir.close(process.io); + + const lib_buzz_name = try std.fmt.allocPrint( + allocator, + "{s}.buzz", + .{manifest.name}, + ); + const lib_zig_name = try std.fmt.allocPrint( + allocator, + "{s}.zig", + .{manifest.name}, + ); + const lib_buzz_path = try std.fmt.allocPrint( + allocator, + "{s}/{s}", + .{ manifest.root_dir, lib_buzz_name }, + ); + const lib_zig_path = try std.fmt.allocPrint( + allocator, + "{s}/{s}", + .{ manifest.root_dir, lib_zig_name }, + ); + + var lib_buzz = std.Io.Writer.Allocating.init(allocator); + defer lib_buzz.deinit(); + try lib_buzz.writer.print( + \\namespace {s}; + \\ + \\import "buzz:std"; + \\ + \\/// A simple exported function + \\export fun helloFromBuzz(name: str) => std\print("Hello from Buzz {{name}}"); + \\ + \\/// Calls into the generated Zig native library. + \\/// + \\/// The Zig side ignores Buzz's native context in this minimal example. + \\/// Use buzz_api.zig when a real native function needs arguments, + \\/// return values, or VM access. + \\export extern fun helloFromZig() > void; + \\ + , + .{manifest.name}, + ); + try src_dir.writeFile(process.io, .{ + .sub_path = lib_buzz_name, + .data = lib_buzz.written(), + }); + if (progress) |p| { + try p.advance(lib_buzz_path); + } + + var lib_zig = std.Io.Writer.Allocating.init(allocator); + defer lib_zig.deinit(); + try lib_zig.writer.print( + \\//! Minimal native library generated by `buzz init`. + \\ + \\const std = @import("std"); + \\ + \\/// Opaque Buzz native call context for this no-argument example. + \\/// + \\/// This template ignores the context, so it does not need Buzz's full native API. + \\/// Real extern libraries should import `buzz_api.zig` to read arguments, push + \\/// return values, or interact with the VM. + \\const NativeCtx = opaque {{}}; + \\ + \\/// Native function signature expected by Buzz. + \\const Native = fn (*NativeCtx) callconv(.c) c_int; + \\ + \\/// Pointer to a Buzz native function. + \\const NativeFn = *const Native; + \\ + \\/// Minimal native callback invoked from Buzz. + \\fn helloFromZig(_: *NativeCtx) callconv(.c) c_int {{ + \\ std.debug.print("Hello from Zig\n", .{{}}); + \\ + \\ return 0; + \\}} + \\ + \\/// Resolves native symbols requested by the generated Buzz library. + \\pub export fn @"{s}"(symbol: [*:0]const u8) callconv(.c) ?NativeFn {{ + \\ if (std.mem.eql(u8, std.mem.span(symbol), "helloFromZig")) {{ + \\ return &helloFromZig; + \\ }} + \\ + \\ return null; + \\}} + \\ + , + .{manifest.name}, + ); + try src_dir.writeFile(process.io, .{ + .sub_path = lib_zig_name, + .data = lib_zig.written(), + }); + if (progress) |p| { + try p.advance(lib_zig_path); + } + + var main_buzz = std.Io.Writer.Allocating.init(allocator); + defer main_buzz.deinit(); + try main_buzz.writer.print( + \\import "pkg:{s}/{s}.buzz"; + \\ + \\/// Runs the generated native library example. + \\fun main(args: [str]) > int {{ + \\ {s}\helloFromBuzz(args[?0] ?? "Mr Nobody"); + \\ + \\ {s}\helloFromZig(); + \\ + \\ return 0; + \\}} + \\ + , + .{ + manifest.name, + manifest.name, + manifest.name, + manifest.name, + }, + ); + try src_dir.writeFile(process.io, .{ + .sub_path = "main.buzz", + .data = main_buzz.written(), + }); + if (progress) |p| { + try p.advance(try std.fmt.allocPrint( + allocator, + "{s}/main.buzz", + .{manifest.root_dir}, + )); + } +} + +/// Init a new buzz package: writes a `manifest.buzz` and a minimal set of example files +pub fn init(process: std.process.Init) !void { + if (exists(process.io, "./" ++ MANIFEST)) { + return error.ManifestAlreadyCreated; + } + + const full_cwd = try std.Io.Dir.cwd().realPathFileAlloc( + process.io, + ".", + process.gpa, + ); + defer process.gpa.free(full_cwd); + const cwd = std.Io.Dir.path.basename(full_cwd[0..]); + + var arena = std.heap.ArenaAllocator.init(process.gpa); + defer arena.deinit(); + const allocator = arena.allocator(); + + var stdout = bzio.stdoutWriter(process.io); + try stdout.interface.writeAll( + "👨‍🚀 This command will guide you through creating a buzz package.\n\n", + ); + + const package_name = try ask( + process, + allocator, + "📦 package name: ", + cwd, + true, + ); + + const version = try ask( + process, + allocator, + "🏷️ version: ", + "1.0.0", + true, + ); + + const description = try ask( + process, + allocator, + "📝 description: ", + null, + false, + ); + + const git_repo = try ask( + process, + allocator, + "🔗 git repository: ", + null, + true, + ); + + const tags = try ask( + process, + allocator, + "🏷️ tags (comma separated): ", + null, + false, + ); + + // Git config is only a convenience default; missing config should not block init. + const git_user_name: ?[]const u8 = if (std.process.run( + allocator, + process.io, + .{ + .argv = &.{ "git", "config", "--get", "user.name" }, + .stdout_limit = .limited(4 * 1024), + .stderr_limit = .limited(4 * 1024), + }, + )) |result| name: { + switch (result.term) { + .exited => |code| if (code != 0) { + break :name null; + }, + else => break :name null, + } + + const name = std.mem.trim(u8, result.stdout, input_whitespace); + if (name.len == 0 or std.mem.findAny(u8, name, "\\\"\n\r\t") != null) { + break :name null; + } + + break :name name; + } else |_| null; + + const git_user_email: ?[]const u8 = if (std.process.run( + allocator, + process.io, + .{ + .argv = &.{ "git", "config", "--get", "user.email" }, + .stdout_limit = .limited(4 * 1024), + .stderr_limit = .limited(4 * 1024), + }, + )) |result| email: { + switch (result.term) { + .exited => |code| if (code != 0) { + break :email null; + }, + else => break :email null, + } + + const email = std.mem.trim(u8, result.stdout, input_whitespace); + if (email.len == 0 or std.mem.findAny(u8, email, "\\\"\n\r\t") != null) { + break :email null; + } + + break :email email; + } else |_| null; + + const author_default = if (git_user_name != null and git_user_email != null) + try std.fmt.allocPrint( + allocator, + "{s} <{s}>", + .{ + git_user_name.?, + git_user_email.?, + }, + ) + else + null; + + const author = try ask( + process, + allocator, + "👤 author: ", + author_default, + false, + ); + + const license = try ask( + process, + allocator, + "⚖️ license: ", + "MIT", + false, + ); + + const version_value = try std.SemanticVersion.parse(version); + if (version_value.pre != null or version_value.build != null) { + return error.InvalidVersion; + } + + var authors = std.ArrayList([]const u8).empty; + if (author.len > 0) { + try authors.append(allocator, author); + } + + var tag_list = std.ArrayList([]const u8).empty; + var tag_it = std.mem.splitScalar(u8, tags, ','); + while (tag_it.next()) |tag| { + const trimmed_tag = std.mem.trim(u8, tag, input_whitespace); + if (trimmed_tag.len == 0) { + continue; + } + + try tag_list.append(allocator, trimmed_tag); + } + + const manifest: Manifest = .{ + .name = package_name, + .version = version_value, + .source = .{ + .url = git_repo, + .ref = null, + }, + .description = if (description.len > 0) description else null, + .authors = try authors.toOwnedSlice(allocator), + .tags = try tag_list.toOwnedSlice(allocator), + .license = if (license.len > 0) license else null, + }; + + try stdout.interface.writeAll("\n📥 Preparing package files\n"); + var progress = InitProgress{ + .out = &stdout.interface, + .total = 5, + }; + + try writePackageFiles( + process, + allocator, + ".", + manifest, + &progress, + ); + try progress.finish(); + + try stdout.interface.print( + \\ + \\🎉 Buzz package created. Run `buzz run` to try it. + \\. + \\├── build.zig + \\├── {s} + \\├── src + \\│ ├── main.buzz + \\│ ├── {s}.buzz + \\│ └── {s}.zig + \\└── {s} + \\ └── {s} -> . + \\ + , + .{ + MANIFEST, + package_name, + package_name, + VENDORS, + package_name, + }, + ); +} + +/// Appends a complete Buzz string literal when the value can be written unescaped. +fn appendBuzzStringLiteral( + allocator: std.mem.Allocator, + buffer: *std.ArrayList(u8), + value: []const u8, +) !void { + const trimmed_value = std.mem.trim(u8, value, input_whitespace); + + try buffer.append(allocator, '"'); + try buffer.appendSlice(allocator, trimmed_value); + try buffer.append(allocator, '"'); +} + +/// Appends an optional one-line string field without leading indentation. +fn appendOptionalStringField( + allocator: std.mem.Allocator, + buffer: *std.ArrayList(u8), + comptime name: []const u8, + value: []const u8, +) !void { + try buffer.appendSlice(allocator, name ++ " = "); + try appendBuzzStringLiteral(allocator, buffer, value); + try buffer.appendSlice(allocator, ",\n"); +} + +/// Appends one lock map with stable package-name ordering. +fn appendLockMap( + allocator: std.mem.Allocator, + buffer: *std.ArrayList(u8), + comptime name: []const u8, + map: std.StringHashMapUnmanaged(ResolvedSource), +) !void { + try buffer.print(allocator, " {s} = ", .{name}); + + if (map.count() == 0) { + try buffer.appendSlice(allocator, "{},\n"); + + return; + } + + try buffer.appendSlice(allocator, "{\n"); + + var keys = std.ArrayList([]const u8).empty; + defer keys.deinit(allocator); + + var it = map.iterator(); + while (it.next()) |entry| { + try keys.append(allocator, entry.key_ptr.*); + } + std.mem.sort([]const u8, keys.items, {}, stringLessThan); + + for (keys.items) |key| { + const source = map.get(key).?; + + try buffer.appendSlice(allocator, " "); + try appendEscapedBuzzStringLiteral(allocator, buffer, key); + try buffer.appendSlice(allocator, ": .{\n url = "); + try appendEscapedBuzzStringLiteral(allocator, buffer, source.url); + try buffer.appendSlice(allocator, ",\n"); + + if (source.ref) |ref| { + try buffer.appendSlice(allocator, " ref = "); + try appendEscapedBuzzStringLiteral(allocator, buffer, ref); + try buffer.appendSlice(allocator, ",\n"); + } + + try buffer.appendSlice(allocator, " hash = "); + try appendEscapedBuzzStringLiteral(allocator, buffer, source.hash); + try buffer.appendSlice(allocator, ",\n },\n"); + } + + try buffer.appendSlice(allocator, " },\n"); +} + +/// Appends a buzz string literal, escaping generated values as needed. +fn appendEscapedBuzzStringLiteral( + allocator: std.mem.Allocator, + buffer: *std.ArrayList(u8), + value: []const u8, +) !void { + try buffer.append(allocator, '"'); + for (value) |byte| { + switch (byte) { + '\\' => try buffer.appendSlice(allocator, "\\\\"), + '"' => try buffer.appendSlice(allocator, "\\\""), + '{' => try buffer.appendSlice(allocator, "\\{"), + '\n' => try buffer.appendSlice(allocator, "\\n"), + '\r' => try buffer.appendSlice(allocator, "\\r"), + '\t' => try buffer.appendSlice(allocator, "\\t"), + else => if (byte < 0x20 or byte == 0x7f) { + try buffer.print(allocator, "\\{d}", .{byte}); + } else { + try buffer.append(allocator, byte); + }, + } + } + try buffer.append(allocator, '"'); +} + +/// Sorts byte strings lexicographically. +fn stringLessThan(_: void, lhs: []const u8, rhs: []const u8) bool { + return std.mem.lessThan(u8, lhs, rhs); +} + +/// Parses semver tags with an optional leading `v`. +fn parseSemverTag(tag: []const u8) ?std.SemanticVersion { + const version_text = if (tag.len > 0 and tag[0] == 'v') + tag[1..] + else + tag; + const version = std.SemanticVersion.parse(version_text) catch return null; + if (version.pre != null or version.build != null) { + return null; + } + + return version; +} + +/// Compares the major/minor prefix of two semantic versions. +fn minorVersionOrder(candidate: std.SemanticVersion, requested: std.SemanticVersion) std.math.Order { + if (candidate.major < requested.major) return .lt; + if (candidate.major > requested.major) return .gt; + if (candidate.minor < requested.minor) return .lt; + if (candidate.minor > requested.minor) return .gt; + + return .eq; +} + +/// Updates a SHA-256 tree hash with a little-endian integer. +fn updatePackageHashInt(hasher: *std.crypto.hash.sha2.Sha256, value: u64) void { + var buffer: [8]u8 = undefined; + std.mem.writeInt(u64, &buffer, value, .little); + hasher.update(&buffer); +} + +/// Computes a deterministic SHA-256 hash of package content, excluding `.git`. +fn hashPackageTree(io: std.Io, allocator: std.mem.Allocator, path: []const u8) ![]const u8 { + var dir = try std.Io.Dir.cwd().openDir(io, path, .{ .iterate = true }); + defer dir.close(io); + + var entries = std.ArrayList(HashEntry).empty; + defer { + for (entries.items) |entry| { + allocator.free(entry.path); + } + entries.deinit(allocator); + } + + var walker = try dir.walk(allocator); + defer walker.deinit(); + while (try walker.next(io)) |entry| { + var components = std.fs.path.componentIterator(entry.path); + var contains_git_dir = false; + while (components.next()) |component| { + if (std.mem.eql(u8, component.name, ".git")) { + contains_git_dir = true; + + break; + } + } + if (contains_git_dir) { + continue; + } + + switch (entry.kind) { + .directory => {}, + .file, .sym_link => try entries.append(allocator, .{ + .path = try allocator.dupe(u8, entry.path), + .kind = entry.kind, + }), + else => return error.UnsupportedDirectoryEntry, + } + } + std.mem.sort(HashEntry, entries.items, {}, HashEntry.lessThan); + + var hasher = std.crypto.hash.sha2.Sha256.init(.{}); + for (entries.items) |entry| { + const kind_marker: [1]u8 = .{switch (entry.kind) { + .file => 'F', + .sym_link => 'L', + else => unreachable, + }}; + hasher.update(&kind_marker); + updatePackageHashInt(&hasher, @intCast(entry.path.len)); + hasher.update(entry.path); + + switch (entry.kind) { + .file => { + var file = try dir.openFile(io, entry.path, .{ .mode = .read_only }); + defer file.close(io); + + const stat = try file.stat(io); + updatePackageHashInt(&hasher, stat.size); + + var file_reader_buffer: [16 * 1024]u8 = undefined; + var file_reader = file.reader(io, &file_reader_buffer); + var read_buffer: [16 * 1024]u8 = undefined; + while (true) { + const bytes_read = try file_reader.interface.readSliceShort(&read_buffer); + if (bytes_read == 0) { + break; + } + + hasher.update(read_buffer[0..bytes_read]); + } + }, + .sym_link => { + var target_buffer: [std.Io.Dir.max_path_bytes]u8 = undefined; + const target_len = try dir.readLink(io, entry.path, &target_buffer); + const target = target_buffer[0..target_len]; + updatePackageHashInt(&hasher, @intCast(target.len)); + hasher.update(target); + }, + else => unreachable, + } + } + + var digest: [std.crypto.hash.sha2.Sha256.digest_length]u8 = undefined; + hasher.final(&digest); + const hex = std.fmt.bytesToHex(digest, .lower); + + return try allocator.dupe(u8, hex[0..]); +} + +/// Prompts until the response is valid, and until a value is present for required prompts. +fn ask( + process: std.process.Init, + allocator: std.mem.Allocator, + comptime question: []const u8, + default: ?[]const u8, + required: bool, +) ![]const u8 { + var stdin_buffer: [1024]u8 = undefined; + var stdin = bzio.stdinReader(process.io, stdin_buffer[0..]); + var stdin_reader = bzio.AllocatedReader.init( + allocator, + &stdin.interface, + null, + ); + var stdout = bzio.stdoutWriter(process.io); + + while (true) { + try stdout.interface.writeAll(question); + if (default) |d| { + try stdout.interface.print("({s}) ", .{d}); + } + + const answer = try stdin_reader.readUntilDelimiterOrEof('\n'); + + const value = if (answer) |a| value: { + const trimmed_answer = std.mem.trim(u8, a, input_whitespace); + if (trimmed_answer.len > 0) { + break :value trimmed_answer; + } + + break :value default orelse ""; + } else default orelse ""; + + if (value.len == 0 and required) { + try stdout.interface.writeAll("A value is required.\n"); + + continue; + } + + if (std.mem.findAny(u8, value, "\\\"\n\r\t") != null) { + try stdout.interface.writeAll("Input cannot contain quotes, backslashes, tabs, or newlines.\n"); + + continue; + } + + return value; + } +} + +/// Builds a minimal process init for package tests. +fn testingProcess( + allocator: std.mem.Allocator, + process_arena: *std.heap.ArenaAllocator, + environ_map: *std.process.Environ.Map, + argv: []const [*:0]const u8, +) !std.process.Init { + return .{ + .minimal = .{ + .args = .{ .vector = argv }, + .environ = std.testing.environ, + }, + .arena = process_arena, + .gpa = allocator, + .io = std.testing.io, + .environ_map = environ_map, + .preopens = try std.process.Preopens.init(process_arena.allocator()), + }; +} + +/// Returns the absolute path of a temporary test directory. +fn testingTmpPath(allocator: std.mem.Allocator, dir: std.Io.Dir) ![]const u8 { + var buffer: [std.Io.Dir.max_path_bytes]u8 = undefined; + const len = try dir.realPath(std.testing.io, &buffer); + + return try allocator.dupe(u8, buffer[0..len]); +} + +/// Runs a test command and fails when it exits unsuccessfully. +fn expectCommandOk(allocator: std.mem.Allocator, argv: []const []const u8, cwd: []const u8) !void { + const result = try std.process.run( + allocator, + std.testing.io, + .{ + .argv = argv, + .cwd = .{ .path = cwd }, + .stdout_limit = .limited(1024 * 1024), + .stderr_limit = .limited(1024 * 1024), + }, + ); + defer allocator.free(result.stdout); + defer allocator.free(result.stderr); + + switch (result.term) { + .exited => |code| if (code != 0) { + std.debug.print( + "command failed: {s}\nstdout:\n{s}\nstderr:\n{s}\n", + .{ + argv[0], + result.stdout, + result.stderr, + }, + ); + + return error.TestCommandFailed; + }, + else => return error.TestCommandFailed, + } +} + +test "manifest lock wraps and parses bare object" { + const allocator = std.testing.allocator; + + var process_arena = std.heap.ArenaAllocator.init(allocator); + defer process_arena.deinit(); + + var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); + defer environ_map.deinit(); + + const argv = [_][*:0]const u8{"package_test"}; + const process = try testingProcess(allocator, &process_arena, &environ_map, &argv); + + var tmp = std.testing.tmpDir(.{}); + defer tmp.cleanup(); + + const source = + \\.{ + \\ dependencies = { + \\ "dep": .{ + \\ url = "somewhere", + \\ ref = "v1.0.0", + \\ hash = "abc", + \\ }, + \\ }, + \\} + ; + + const wrapped = try wrapManifestLock(allocator, source); + defer allocator.free(wrapped); + try std.testing.expect(std.mem.startsWith( + u8, + wrapped, + "import \"buzz:manifest\" as _;final manifestLock: ManifestLock = .{", + )); + + try tmp.dir.writeFile(std.testing.io, .{ + .sub_path = MANIFEST_LOCK, + .data = source, + }); + + const tmp_path = try testingTmpPath(allocator, tmp.dir); + defer allocator.free(tmp_path); + const lock_path = try std.fs.path.join(allocator, &.{ tmp_path, MANIFEST_LOCK }); + defer allocator.free(lock_path); + + const lock = try loadManifestLock(process, process_arena.allocator(), lock_path); + const dep = lock.dependencies.get("dep").?; + try std.testing.expectEqualStrings("somewhere", dep.url); + try std.testing.expectEqualStrings("v1.0.0", dep.ref.?); + try std.testing.expectEqualStrings("abc", dep.hash); +} + +test "manifest lock serialization is deterministic" { + const allocator = std.testing.allocator; + + var lock = ManifestLock{}; + defer lock.dependencies.deinit(allocator); + defer lock.dev_dependencies.deinit(allocator); + + try lock.dependencies.put(allocator, "z", .{ + .url = "last", + .ref = null, + .hash = "hash-z", + }); + try lock.dependencies.put(allocator, "a", .{ + .url = "first", + .ref = "v1.0.0", + .hash = "hash-a", + }); + + const source = try lock.toSource(allocator); + defer allocator.free(source); + + try std.testing.expectEqualStrings( + \\.{ + \\ dependencies = { + \\ "a": .{ + \\ url = "first", + \\ ref = "v1.0.0", + \\ hash = "hash-a", + \\ }, + \\ "z": .{ + \\ url = "last", + \\ hash = "hash-z", + \\ }, + \\ }, + \\ devDependencies = {}, + \\} + \\ + , + source, + ); +} + +test "version constraints use full major and minor comparisons" { + const requested: std.SemanticVersion = .{ .major = 1, .minor = 2, .patch = 3 }; + + try std.testing.expect(Manifest.Source.Constraint.equalTo.matches( + requested, + .{ .major = 1, .minor = 2, .patch = 3 }, + )); + try std.testing.expect(!Manifest.Source.Constraint.equalTo.matches( + requested, + .{ .major = 1, .minor = 2, .patch = 4 }, + )); + try std.testing.expect(Manifest.Source.Constraint.majorEqualTo.matches( + requested, + .{ .major = 1, .minor = 9, .patch = 0 }, + )); + try std.testing.expect(!Manifest.Source.Constraint.majorEqualTo.matches( + requested, + .{ .major = 2, .minor = 0, .patch = 0 }, + )); + try std.testing.expect(Manifest.Source.Constraint.minorEqualTo.matches( + requested, + .{ .major = 1, .minor = 2, .patch = 99 }, + )); + try std.testing.expect(!Manifest.Source.Constraint.minorEqualTo.matches( + requested, + .{ .major = 1, .minor = 3, .patch = 0 }, + )); +} + +test "git version constraint selects highest matching semver tag" { + const allocator = std.testing.allocator; + + var tmp = std.testing.tmpDir(.{}); + defer tmp.cleanup(); + + const repo_path = try testingTmpPath(allocator, tmp.dir); + defer allocator.free(repo_path); + + try expectCommandOk(allocator, &.{ "git", "init" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "config", "user.email", "test@example.com" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "config", "user.name", "Test User" }, repo_path); + + try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "value.txt", .data = "one" }); + try expectCommandOk(allocator, &.{ "git", "add", "value.txt" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "commit", "-m", "one" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "tag", "v1.0.0" }, repo_path); + + try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "value.txt", .data = "two" }); + try expectCommandOk(allocator, &.{ "git", "add", "value.txt" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "commit", "-m", "two" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "tag", "1.2.0" }, repo_path); + + try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "value.txt", .data = "three" }); + try expectCommandOk(allocator, &.{ "git", "add", "value.txt" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "commit", "-m", "three" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "tag", "v1.3.0" }, repo_path); + + try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "value.txt", .data = "four" }); + try expectCommandOk(allocator, &.{ "git", "add", "value.txt" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "commit", "-m", "four" }, repo_path); + try expectCommandOk(allocator, &.{ "git", "tag", "2.0.0" }, repo_path); + + const source: Manifest.Source = .{ + .url = try std.fmt.allocPrint(allocator, "git+{s}", .{repo_path}), + .ref = null, + .version = .{ .major = 1, .minor = 0, .patch = 0 }, + .constraint = .majorEqualTo, + }; + defer allocator.free(source.url); + const resolved_ref = try source.resolveVersionRef(std.testing.io, allocator); + defer allocator.free(resolved_ref); + + try std.testing.expectEqualStrings("v1.3.0", resolved_ref); +} + +test "source fetch writes and validates lock file" { + const allocator = std.testing.allocator; + + var process_arena = std.heap.ArenaAllocator.init(allocator); + defer process_arena.deinit(); + + var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); + defer environ_map.deinit(); + + const argv = [_][*:0]const u8{"package_test"}; + const process = try testingProcess(allocator, &process_arena, &environ_map, &argv); + + var progress_output = std.Io.Writer.Allocating.init(allocator); + defer progress_output.deinit(); + var progress = InitProgress{ + .out = &progress_output.writer, + .total = 1, + }; + + var tmp = std.testing.tmpDir(.{}); + defer tmp.cleanup(); + + try tmp.dir.createDir(std.testing.io, "dep", .default_dir); + var dep_dir = try tmp.dir.openDir(std.testing.io, "dep", .{}); + defer dep_dir.close(std.testing.io); + + try dep_dir.writeFile(std.testing.io, .{ + .sub_path = "data.txt", + .data = "hello", + }); + + const root_path = try testingTmpPath(allocator, tmp.dir); + defer allocator.free(root_path); + const dep_path = try std.fs.path.join(allocator, &.{ root_path, "dep" }); + defer allocator.free(dep_path); + + const source: Manifest.Source = .{ + .url = dep_path, + .ref = null, + }; + + const fetched = try source.fetch(process, allocator, root_path, "dep", &progress); + defer allocator.free(fetched.destination); + defer allocator.free(fetched.resolved_source.hash); + + var lock = ManifestLock{}; + defer lock.dependencies.deinit(allocator); + defer lock.dev_dependencies.deinit(allocator); + try lock.dependencies.put(allocator, "dep", fetched.resolved_source); + + const lock_path = try std.fs.path.join(allocator, &.{ root_path, MANIFEST_LOCK }); + defer allocator.free(lock_path); + try lock.write(std.testing.io, allocator, lock_path); + + const loaded_lock = try loadManifestLock(process, process_arena.allocator(), lock_path); + const locked_dep = loaded_lock.dependencies.get("dep").?; + try std.testing.expectEqualStrings(dep_path, locked_dep.url); + try std.testing.expect(locked_dep.ref == null); + try std.testing.expectEqual(@as(usize, 64), locked_dep.hash.len); + + const vendor_dep_path = try std.fs.path.join(allocator, &.{ root_path, VENDORS, "dep" }); + defer allocator.free(vendor_dep_path); + const vendor_hash = try hashPackageTree(std.testing.io, allocator, vendor_dep_path); + defer allocator.free(vendor_hash); + try std.testing.expectEqualStrings(vendor_hash, locked_dep.hash); + + const locked_fetch = try locked_dep.fetch(process, allocator, root_path, "dep", &progress); + defer allocator.free(locked_fetch.destination); + try std.testing.expect(!locked_fetch.downloaded); + + try source.validateLock(locked_dep); + try std.testing.expectError(error.ManifestLockDrift, (Manifest.Source{ + .url = "/somewhere/else", + .ref = null, + }).validateLock(locked_dep)); +} diff --git a/src/Parser.zig b/src/Parser.zig index 31601ce5..328b05a3 100644 --- a/src/Parser.zig +++ b/src/Parser.zig @@ -131,7 +131,9 @@ gc: *GC, perf: ?*Perf = null, scanner: ?Scanner = null, current_token: ?Ast.TokenIndex = null, -script_name: []const u8 = undefined, +/// Absolute root directory of the package being run. +root_dir: []const u8 = &.{}, +script_name: []const u8 = &.{}, /// If true the script is being imported imported: bool = false, /// True when parsing a declaration inside an export statement @@ -225,8 +227,8 @@ pub fn buzzPrefix(io: std.Io, env: *std.process.Environ.Map) []const u8 { } const path = if (!is_wasm) p: { - _ = std.process.executablePath(io, &_buzz_path_buffer) catch return defaultBuzzPrefix(); - break :p _buzz_path_buffer[0..]; + const path_len = std.process.executablePath(io, &_buzz_path_buffer) catch return defaultBuzzPrefix(); + break :p _buzz_path_buffer[0..path_len]; } else defaultBuzzPrefix(); const path1 = std.Io.Dir.path.dirname(path) orelse defaultBuzzPrefix(); @@ -468,73 +470,6 @@ const ParseRule = struct { precedence: Precedence = .None, }; -const search_paths = if (builtin.os.tag == .windows) - [_][]const u8{ - "#/?.!", - "#/?/main.!", - "#/?/src/?.!", - "#/?/src/main.!", - "$/?.!", - "$/?/main.!", - "$/?/src/?.!", - "$/?/src/main.!", - "./?.!", - "./?/main.!", - "./?/src/main.!", - "./?/src/?.!", - "./src/?.!", - // TODO: what would be common windows paths for this? - } -else - [_][]const u8{ - "#/?.!", - "#/?/main.!", - "#/?/src/?.!", - "#/?/src/main.!", - "$/?.!", - "$/?/main.!", - "$/?/src/?.!", - "$/?/src/main.!", - "./?.!", - "./?/main.!", - "./?/src/main.!", - "./?/src/?.!", - "./src/?.!", - "/usr/share/buzz/?.!", - "/usr/share/buzz/?/main.!", - "/usr/share/buzz/?/src/main.!", - "/usr/local/share/buzz/?/src/?.!", - "/usr/local/share/buzz/?.!", - "/usr/local/share/buzz/?/main.!", - "/usr/local/share/buzz/?/src/main.!", - "/usr/local/share/buzz/?/src/?.!", - }; - -const lib_search_paths = if (builtin.os.tag == .windows) - [_][]const u8{ - "#/?.!", - "#/?/src/?.!", - "$/?.!", - "$/?/src/?.!", - "./?.!", - "./?/src/?.!", - "./src/?.!", - } -else - [_][]const u8{ - "#/lib?.!", - "#/?/src/lib?.!", - "$/lib?.!", - "$/?/src/lib?.!", - "./lib?.!", - "./?/src/lib?.!", - "./src/lib?.!", - "/usr/share/buzz/lib?.!", - "/usr/share/buzz/?/src/lib?.!", - "/usr/share/local/buzz/lib?.!", - "/usr/share/local/buzz/?/src/lib?.!", - }; - const zdef_search_paths = if (builtin.os.tag == .windows) [_][]const u8{ "./?.!", @@ -940,10 +875,18 @@ fn synchronize(self: *Self) !void { } } -pub fn parse(self: *Self, source: []const u8, file_name: ?[]const u8, name: []const u8) !?Ast { +pub fn parse( + self: *Self, + source: []const u8, + root_dir: []const u8, + file_name: ?[]const u8, + name: []const u8, +) !?Ast { var perf_scope = Perf.start(self.perf, .parser); defer perf_scope.end(); + self.root_dir = root_dir; + if (self.scanner != null) { self.scanner = null; } @@ -6799,7 +6742,6 @@ fn function( try self.importLibSymbol( self.ast.nodes.items(.location)[function_node], self.current_token.? - 1, - self.script_name, function_typedef.resolved_type.?.Function.name.string, ) else @@ -7203,7 +7145,7 @@ fn yield(self: *Self, _: bool) Error!Ast.Node.Index { ); } - const expr = try self.parsePrecedence(.Primary, false); + const expr = try self.parsePrecedence(.Unary, false); return try self.ast.appendNode( .{ @@ -8859,83 +8801,7 @@ fn testStatement(self: *Self) Error!Ast.Node.Index { return @intCast(node_slot); } -fn searchPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { - const dir_name = std.fs.path.dirname(full_file_name); - const file_name = std.fs.path.basename(full_file_name); - - var paths = std.ArrayList([]const u8).empty; - - for (search_paths) |path| { - const filled = try std.mem.replaceOwned( - u8, - self.gc.allocator, - path, - "?", - file_name, - ); - defer self.gc.allocator.free(filled); - - const suffixed = try std.mem.replaceOwned( - u8, - self.gc.allocator, - filled, - "!", - "buzz", - ); - defer self.gc.allocator.free(suffixed); - - const cwd = if (dir_name) |dn| - if (!std.fs.path.isAbsolute(dn)) - try std.mem.replaceOwned( - u8, - self.gc.allocator, - suffixed, - "#", - "./#", - ) - else - null - else - null; - defer if (cwd) |d| self.gc.allocator.free(d); - - const dir = if (dir_name) |dn| try std.mem.replaceOwned( - u8, - self.gc.allocator, - cwd orelse suffixed, - "#", - dn, - ) else null; - defer if (dir) |d| self.gc.allocator.free(d); - - const prefixed = try std.mem.replaceOwned( - u8, - self.gc.allocator, - dir orelse suffixed, - "$", - buzzLibPath(self.process.io, self.process.environ_map), - ); - - if (std.fs.path.sep != '/') { - const windows = try std.mem.replaceOwned( - u8, - self.gc.allocator, - prefixed, - "/", - std.fs.path.sep_str, - ); - try paths.append(self.gc.allocator, windows); - } else { - try paths.append(self.gc.allocator, prefixed); - } - } - - return try paths.toOwnedSlice(self.gc.allocator); -} - -fn searchLibPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { - const dir_name = std.fs.path.dirname(full_file_name); - const file_name = std.fs.path.basename(full_file_name); +fn searchZdefLibPaths(self: *Self, file_name: []const u8) ![][]const u8 { const file_names = [_][]const u8{ file_name, if (builtin.os.tag == .windows and std.mem.startsWith(u8, file_name, "lib")) @@ -8943,7 +8809,6 @@ fn searchLibPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { else "", }; - var paths = std.ArrayList([]const u8).empty; for (file_names) |candidate_name| { @@ -8951,16 +8816,9 @@ fn searchLibPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { continue; } - for (lib_search_paths) |path| { - const filled = try std.mem.replaceOwned( - u8, - self.gc.allocator, - path, - "?", - candidate_name, - ); + for (zdef_search_paths) |path| { + const filled = try std.mem.replaceOwned(u8, self.gc.allocator, path, "?", candidate_name); defer self.gc.allocator.free(filled); - const suffixed = try std.mem.replaceOwned( u8, self.gc.allocator, @@ -8973,56 +8831,23 @@ fn searchLibPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { else => unreachable, }, ); - defer self.gc.allocator.free(suffixed); - - const cwd = if (dir_name) |dn| - if (!std.fs.path.isAbsolute(dn)) - try std.mem.replaceOwned( - u8, - self.gc.allocator, - suffixed, - "#", - "./#", - ) - else - null - else - null; - defer if (cwd) |d| self.gc.allocator.free(d); - - const dir = if (dir_name) |dn| try std.mem.replaceOwned( - u8, - self.gc.allocator, - cwd orelse suffixed, - "#", - dn, - ) else null; - defer if (dir) |d| self.gc.allocator.free(d); - - const prefixed = try std.mem.replaceOwned( - u8, - self.gc.allocator, - dir orelse suffixed, - "$", - buzzLibPath(self.process.io, self.process.environ_map), - ); if (builtin.os.tag == .windows) { const windows = try std.mem.replaceOwned( u8, self.gc.allocator, - prefixed, + suffixed, "/", std.fs.path.sep_str, ); try paths.append(self.gc.allocator, windows); } else { - try paths.append(self.gc.allocator, prefixed); + try paths.append(self.gc.allocator, suffixed); } } } - for (user_library_paths orelse &[_][]const u8{}) |path| { + for (Self.user_library_paths orelse &[_][]const u8{}) |path| { for (file_names) |candidate_name| { if (candidate_name.len == 0) { continue; @@ -9080,212 +8905,199 @@ fn searchLibPaths(self: *Self, full_file_name: []const u8) ![][]const u8 { return try paths.toOwnedSlice(self.gc.allocator); } -fn searchZdefLibPaths(self: *Self, file_name: []const u8) ![][]const u8 { - const file_names = [_][]const u8{ - file_name, - if (builtin.os.tag == .windows and std.mem.startsWith(u8, file_name, "lib")) - file_name["lib".len..] - else - "", - }; - var paths = std.ArrayList([]const u8).empty; +pub const Import = struct { + path: []const u8, + source: []const u8, + owned_path: bool = false, + owned_source: bool = false, - for (file_names) |candidate_name| { - if (candidate_name.len == 0) { - continue; + /// Frees data read for a resolved import that was not parsed. + pub fn deinit(self: Import, allocator: std.mem.Allocator) void { + if (self.owned_source) { + allocator.free(self.source); } + if (self.owned_path) { + allocator.free(self.path); + } + } +}; - for (zdef_search_paths) |path| { - const filled = try std.mem.replaceOwned(u8, self.gc.allocator, path, "?", candidate_name); - defer self.gc.allocator.free(filled); - const suffixed = try std.mem.replaceOwned( - u8, - self.gc.allocator, - filled, - "!", - switch (builtin.os.tag) { - .linux, .freebsd, .openbsd => "so", - .windows => "dll", - .macos, .tvos, .watchos, .ios => "dylib", - else => unreachable, - }, - ); +/// Reports a missing script at the current import token. +fn reportScriptNotFound(self: *Self, file_name: []const u8) void { + const location = self.ast.tokens.get(self.current_token.? - 1); + self.reporter.reportErrorFmt( + .script_not_found, + location, + location, + "buzz script `{s}` not found", + .{ + file_name, + }, + ); +} - if (builtin.os.tag == .windows) { - const windows = try std.mem.replaceOwned( - u8, - self.gc.allocator, - suffixed, - "/", - std.fs.path.sep_str, - ); - try paths.append(self.gc.allocator, windows); - } else { - try paths.append(self.gc.allocator, suffixed); - } +/// Resolve an import path to an actual script and read it. +pub fn resolveImport(self: *Self, path: []const u8) Error!?Import { + if (std.mem.startsWith(u8, path, "buzz:")) { + return try self.readStdLibScript(path["buzz:".len..], true); + } else if (std.mem.startsWith(u8, path, "pkg:")) { + if (is_wasm) { + self.reportScriptNotFound(path); + return null; } - } - for (Self.user_library_paths orelse &[_][]const u8{}) |path| { - for (file_names) |candidate_name| { - if (candidate_name.len == 0) { - continue; - } + const unprefixed = path["pkg:".len..]; - var filled = std.Io.Writer.Allocating.init(self.gc.allocator); + if (std.mem.indexOf(u8, unprefixed, "/")) |first_slash| { + const pkg_name = unprefixed[0..first_slash]; + const pkg_script_path = unprefixed[pkg_name.len + 1 ..]; - try filled.writer.print( - "{s}{s}{s}.{s}", - .{ - path, - if (!std.mem.endsWith(u8, path, std.fs.path.sep_str)) - std.fs.path.sep_str - else - "", - candidate_name, - switch (builtin.os.tag) { - .linux, .freebsd, .openbsd => "so", - .windows => "dll", - .macos, .tvos, .watchos, .ios => "dylib", - else => unreachable, - }, + const package_root = try std.fs.path.join( + self.gc.allocator, + &.{ + self.root_dir, + "vendors", + pkg_name, }, ); + defer self.gc.allocator.free(package_root); - try paths.append(self.gc.allocator, try filled.toOwnedSlice()); - - var prefixed_filled = std.Io.Writer.Allocating.init(self.gc.allocator); - - try prefixed_filled.writer.print( - "{s}{s}lib{s}.{s}", - .{ - path, - if (!std.mem.endsWith(u8, path, std.fs.path.sep_str)) - std.fs.path.sep_str - else - "", - candidate_name, - switch (builtin.os.tag) { - .linux, .freebsd, .openbsd => "so", - .windows => "dll", - .macos, .tvos, .watchos, .ios => "dylib", - else => unreachable, - }, + const package_source_dir = try std.fs.path.join( + self.gc.allocator, + &.{ + package_root, + "src", }, ); + defer self.gc.allocator.free(package_source_dir); - try paths.append( + const full_path = try std.fs.path.join( self.gc.allocator, - try prefixed_filled.toOwnedSlice(), + &.{ + package_source_dir, + pkg_script_path, + }, ); + defer self.gc.allocator.free(full_path); + + return try self.readScript(full_path); } + + self.reportScriptNotFound(path); + + return null; } - return try paths.toOwnedSlice(self.gc.allocator); + if (is_wasm) { + self.reportScriptNotFound(path); + return null; + } + + if (std.fs.path.isAbsolute(path)) { + return try self.readScript(path); + } + + const relative_base = std.fs.path.dirname(self.script_name) orelse self.root_dir; + const full_path = try std.fs.path.join( + self.gc.allocator, + &.{ + relative_base, + path, + }, + ); + defer self.gc.allocator.free(full_path); + + return try self.readScript(full_path); } -fn readStaticScript(self: *Self, file_name: []const u8) ?[2][]const u8 { +fn readStdLibScript(self: *Self, file_name: []const u8, report_not_found: bool) Error!?Import { inline for (static_libraries.all) |library| { if (std.mem.eql(u8, file_name, library.header.name)) { - return [_][]const u8{ - @embedFile("lib/" ++ library.header.path), - library.header.name, - }; + if (is_wasm) { + return .{ + .source = @embedFile("lib/" ++ library.header.path), + .path = library.header.name, + }; + } + + const full_path = try std.fs.path.join( + self.gc.allocator, + &.{ + buzzLibPath(self.process.io, self.process.environ_map), + library.header.path, + }, + ); + defer self.gc.allocator.free(full_path); + + var source_and_path = (try self.readScript(full_path)) orelse return null; + if (source_and_path.owned_path) { + self.gc.allocator.free(source_and_path.path); + } + + source_and_path.path = library.header.name; + source_and_path.owned_path = false; + + return source_and_path; } } - // If wasm it will not fallback to importing actual files - if (is_wasm) { - const location = self.ast.tokens.get(self.current_token.? - 1); - self.reporter.reportErrorFmt( - .script_not_found, - location, - location, - "buzz script `{s}` not found", - .{ - file_name, - }, - ); + // Its a `buzz:...` path if we did not resolve this here, there's no fallback + if (report_not_found) { + self.reportScriptNotFound(file_name); } return null; } -fn readScript(self: *Self, file_name: []const u8) !?[2][]const u8 { - const paths = try self.searchPaths(file_name); - var selected_absolute_path_index: ?usize = null; - defer { - for (paths, 0..) |path, index| { - if (selected_absolute_path_index != null and selected_absolute_path_index.? == index) { - continue; - } +fn readScript(self: *Self, raw_file_name: []const u8) Error!?Import { + const suffixed_file_name = if (std.mem.endsWith(u8, raw_file_name, ".buzz")) + null + else + try std.fmt.allocPrint(self.gc.allocator, "{s}.buzz", .{raw_file_name}); + defer if (suffixed_file_name) |name| self.gc.allocator.free(name); - self.gc.allocator.free(path); - } - self.gc.allocator.free(paths); - } + const file_name = try self.gc.allocator.dupe(u8, suffixed_file_name orelse raw_file_name); + defer self.gc.allocator.free(file_name); - // Find and read file - var file: ?std.Io.File = null; - var absolute_path: ?[]const u8 = null; - for (paths, 0..) |path, index| { - if (std.fs.path.isAbsolute(path)) { - file = std.Io.Dir.openFileAbsolute(self.process.io, path, .{}) catch null; - if (file != null) { - selected_absolute_path_index = index; - absolute_path = path; - break; - } - } else { - file = std.Io.Dir.cwd().openFile(self.process.io, path, .{}) catch null; - if (file != null) { - absolute_path = std.Io.Dir.cwd().realPathFileAlloc(self.process.io, path, self.gc.allocator) catch { - return Error.ImportError; - }; - break; - } - } + if (std.fs.path.sep != '/') { + std.mem.replaceScalar(u8, file_name, '/', std.fs.path.sep); } - if (file == null) { - var search_report = std.Io.Writer.Allocating.init(self.gc.allocator); - defer search_report.deinit(); - for (paths) |path| { - try search_report.writer.print(" no file `{s}`\n", .{path}); - } + const file_opt = if (std.fs.path.isAbsolute(file_name)) + std.Io.Dir.openFileAbsolute(self.process.io, file_name, .{}) catch null + else + std.Io.Dir.cwd().openFile(self.process.io, file_name, .{}) catch null; - const location = self.ast.tokens.get(self.current_token.? - 1); - self.reporter.reportErrorFmt( - .script_not_found, - location, - location, - "buzz script `{s}` not found:\n{s}", - .{ - file_name, - search_report.written(), - }, - ); + if (file_opt) |file| { + defer file.close(self.process.io); - return null; - } + const source = try self.gc.allocator.alloc( + u8, + (file.stat(self.process.io) catch { + return Error.ImportError; + }).size, + ); - defer file.?.close(self.process.io); + _ = file.readPositionalAll(self.process.io, source, 0) catch { + return Error.ImportError; + }; - const source = try self.gc.allocator.alloc( - u8, - (file.?.stat(self.process.io) catch { + var absolute_path: [std.Io.Dir.max_path_bytes]u8 = undefined; + const len = file.realPath(self.process.io, &absolute_path) catch { return Error.ImportError; - }).size, - ); + }; - _ = file.?.readPositionalAll(self.process.io, source, 0) catch { - return Error.ImportError; - }; + return .{ + .source = source, + .path = try self.gc.allocator.dupe(u8, absolute_path[0..len]), + .owned_path = true, + .owned_source = true, + }; + } - return [_][]const u8{ - source, - absolute_path.?, - }; + self.reportScriptNotFound(file_name); + + return null; } fn checkImportedNamespaceCollision(self: *Self, namespace: []const Ast.TokenIndex) Error!void { @@ -9363,10 +9175,15 @@ fn importScript( prefix: ?[]const Ast.TokenIndex, imported_symbols: *std.StringHashMapUnmanaged(Ast.Node.Index), ) Error!?ScriptImport { - var import = self.imports.get(file_name); + const source_and_path = (try self.resolveImport(file_name)) orelse { + return null; + }; var imported_namespace: ?[]const Ast.TokenIndex = null; - if (import) |*uimport| { + var import = self.imports.getPtr(source_and_path.path); + if (import) |uimport| { + source_and_path.deinit(self.gc.allocator); + if (uimport.imported_by.get(self.current.?) != null) { const location = self.ast.tokens.get(path_token); self.reporter.reportErrorFmt( @@ -9386,14 +9203,8 @@ fn importScript( {}, ); } else { - const source_and_path = - self.readStaticScript(file_name) orelse - if (!is_wasm) - try self.readScript(file_name) - else - null; - - if (source_and_path == null) { + if (is_wasm and source_and_path.owned_source) { + source_and_path.deinit(self.gc.allocator); return null; } @@ -9421,7 +9232,7 @@ fn importScript( self.ast.tokens.items(.utility_token)[self.current_token.?] = true; std.debug.assert(!token_before_import.utility_token); - if (try parser.parse(source_and_path.?[0], source_and_path.?[1], file_name)) |ast| { + if (try parser.parse(source_and_path.source, self.root_dir, null, source_and_path.path)) |ast| { self.ast = ast; self.ast.nodes.items(.components)[self.ast.root.?].Function.import_root = true; @@ -9429,12 +9240,12 @@ fn importScript( imported_namespace = try ast.slice().namespace(self.gc.allocator, ast.root.?); } - import = ScriptImport{ + var new_import = ScriptImport{ .function = self.ast.root.?, - .absolute_path = try self.gc.copyString(source_and_path.?[1]), + .absolute_path = try self.gc.copyString(source_and_path.path), }; - try import.?.imported_by.put( + try new_import.imported_by.put( self.gc.allocator, self.current.?, {}, @@ -9452,17 +9263,18 @@ fn importScript( global.hidden = true; } - try import.?.globals.append(self.gc.allocator, global.*); + try new_import.globals.append(self.gc.allocator, global.*); } try self.imports.put( self.gc.allocator, - file_name, - import.?, + new_import.absolute_path.string, + new_import, ); + import = self.imports.getPtr(new_import.absolute_path.string).?; try self.script_imports.put( self.gc.allocator, - file_name, + import.?.absolute_path.string, .{ .location = path_token, .end_location = path_token, @@ -9536,7 +9348,7 @@ fn importScript( }; } - global.imported_from = file_name; + global.imported_from = imported.absolute_path.string; // TODO: we're forced to import all and hide some because globals are indexed and not looked up by name at runtime // Only way to avoid this is to go back to named globals at runtime. Then again, is it worth it? @@ -9555,7 +9367,7 @@ fn importScript( return Error.CantCompile; } - return import; + return import.?.*; } // This is used in the wasm build. There, we only allow the import of std libs by name @@ -9576,11 +9388,74 @@ fn importStaticLibSymbol(self: *Self, file_name: []const u8, symbol: []const u8) null; } +/// Returns the native dynamic library extension for the current target. +fn dynamicLibraryExtension() []const u8 { + return switch (builtin.os.tag) { + .linux, .freebsd, .openbsd => "so", + .windows => "dll", + .macos, .tvos, .watchos, .ios => "dylib", + else => unreachable, + }; +} + +/// Returns the portion of `path` that is inside `dir`, if any. +fn pathWithinDir(path: []const u8, dir: []const u8) ?[]const u8 { + if (std.mem.eql(u8, path, dir)) { + return path[path.len..]; + } + + if (path.len <= dir.len or !std.mem.startsWith(u8, path, dir)) { + return null; + } + + if (path[dir.len] != std.fs.path.sep) { + return null; + } + + return path[dir.len + 1 ..]; +} + +/// Returns whether a dynamic library path exists. +fn nativeLibraryExists(self: *Self, library_path: []const u8) bool { + if (std.fs.path.isAbsolute(library_path)) { + std.Io.Dir.accessAbsolute( + self.process.io, + library_path, + .{ .read = true }, + ) catch return false; + + return true; + } + + std.Io.Dir.cwd().access(self.process.io, library_path, .{ .read = true }) catch return false; + + return true; +} + +/// Opens a dynamic library path and extracts its Buzz native lookup helper. +fn openNativeLibraryAt(self: *Self, library_path: []const u8, library_name: []const u8) !?Dlib { + var lib = DynLib.open(self.gc.allocator, library_path) catch return null; + errdefer lib.close(); + + const name = try self.gc.allocator.dupeZ(u8, library_name); + defer self.gc.allocator.free(name); + + if (lib.lookup(Dlib.LookupFn, name)) |lookup_fn| { + return .{ + .dynlib = lib, + .lookup_fn = lookup_fn, + }; + } + + lib.close(); + + return null; +} + fn importLibSymbol( self: *Self, location: Ast.TokenIndex, end_location: Ast.TokenIndex, - full_file_name: []const u8, symbol: []const u8, ) !?*obj.ObjNative { // Don't bother if we're not actually running the script @@ -9588,97 +9463,181 @@ fn importLibSymbol( return undefined; } - // Remove .buzz extension, this occurs if this is the script being run or if the script was imported like so `import lib/std.buzz` - // We consider that any other extension is silly from the part of the user - const file_name = if (std.mem.endsWith(u8, full_file_name, ".buzz")) - full_file_name[0..(full_file_name.len - 5)] + // Native libraries are named after the Buzz script that declares the extern, + // not after the package. `src/date.buzz` expects `libdate.` and a `date` + // lookup function in that dynamic library. + const script_basename = std.fs.path.basename(self.script_name); + const native_name = if (std.mem.endsWith(u8, script_basename, ".buzz")) + script_basename[0 .. script_basename.len - ".buzz".len] else - full_file_name; + script_basename; - const file_basename = std.fs.path.basename(file_name); + // Loose scripts resolve their native library next to the script. Package + // scripts override this below so their libraries live at the package root. + var native_dir = std.fs.path.dirname(self.script_name) orelse self.root_dir; + var allow_user_fallback = true; - if (self.dlib_symbols.getEntry(file_basename) orelse dl: { - const paths = try self.searchLibPaths(file_name); - defer { - for (paths) |path| { - self.gc.allocator.free(path); + const vendors_dir = try std.fs.path.join( + self.gc.allocator, + &.{ + self.root_dir, + "vendors", + }, + ); + defer self.gc.allocator.free(vendors_dir); + + const root_source_dir = try std.fs.path.join( + self.gc.allocator, + &.{ + self.root_dir, + "src", + }, + ); + defer self.gc.allocator.free(root_source_dir); + + if (pathWithinDir(self.script_name, vendors_dir)) |vendor_relative| { + if (std.mem.indexOfScalar(u8, vendor_relative, std.fs.path.sep)) |pkg_name_len| { + const pkg_name = vendor_relative[0..pkg_name_len]; + const pkg_relative = vendor_relative[pkg_name_len + 1 ..]; + + // Dependency package imports must be under + // `/vendors//src/...`; their native libraries live in + // `/vendors//`. + if (pkg_name.len > 0 and + pkg_relative.len > "src".len and + std.mem.startsWith(u8, pkg_relative, "src") and + pkg_relative["src".len] == std.fs.path.sep) + { + const package_root_end = vendors_dir.len + 1 + pkg_name.len; + native_dir = self.script_name[0..package_root_end]; + allow_user_fallback = false; } - self.gc.allocator.free(paths); } + } else if (pathWithinDir(self.script_name, root_source_dir) != null) { + // Root package scripts use `/lib.`, even when the + // declaring script is nested inside `src/`. + native_dir = self.root_dir; + allow_user_fallback = false; + } - var tried = std.ArrayList([]const u8).empty; - defer tried.deinit(self.gc.allocator); - - var lib = lib: { - for (paths) |path| { - try tried.append(self.gc.allocator, path); - - var exists = true; - if (std.fs.path.isAbsolute(path)) { - std.Io.Dir.accessAbsolute( - self.process.io, - path, - .{ .read = true }, - ) catch { - exists = false; - }; - } else { - std.Io.Dir.cwd().access(self.process.io, path, .{ .read = true }) catch { - exists = false; - }; - } - - if (exists) { - break :lib DynLib.open(self.gc.allocator, path) catch null; - } - } - break :lib null; - }; + if (self.dlib_symbols.getEntry(native_name) orelse dl: { + const library_file_name = try std.fmt.allocPrint( + self.gc.allocator, + "{s}{s}.{s}", + .{ + if (builtin.os.tag == .windows) "" else "lib", + native_name, + dynamicLibraryExtension(), + }, + ); + defer self.gc.allocator.free(library_file_name); - if (lib) |*dlib| { - const name = try self.gc.allocator.dupeZ(u8, file_basename); - defer self.gc.allocator.free(name); + const primary_library_path = try std.fs.path.join( + self.gc.allocator, + &.{ + native_dir, + library_file_name, + }, + ); + defer self.gc.allocator.free(primary_library_path); - // We search for the library helper which should have the same name as the library itself - if (dlib.lookup(Dlib.LookupFn, name)) |lookup_fn| { - const new = Dlib{ - .dynlib = dlib.*, - .lookup_fn = lookup_fn, - }; + var search_report = std.Io.Writer.Allocating.init(self.gc.allocator); + defer search_report.deinit(); + const primary_exists = self.nativeLibraryExists(primary_library_path); + if (primary_exists) { + if (try self.openNativeLibraryAt(primary_library_path, native_name)) |dlib| { try self.dlib_symbols.put( self.gc.allocator, - file_basename, - new, + native_name, + dlib, ); - break :dl self.dlib_symbols.getEntry(file_basename).?; + break :dl self.dlib_symbols.getEntry(native_name).?; } - } else { - var search_report = std.Io.Writer.Allocating.init(self.gc.allocator); - defer search_report.deinit(); + } - for (tried.items, 0..) |path, i| { - if (i == 0) try search_report.writer.print("\n", .{}); - try search_report.writer.print(" no file `{s}`\n", .{path}); - } + try search_report.writer.print( + "\n {s} `{s}`\n", + .{ + if (primary_exists) "could not load" else "no file", + primary_library_path, + }, + ); - self.reporter.reportErrorFmt( - .library_not_found, - self.ast.tokens.get(location), - self.ast.tokens.get(end_location), - "External library `{s}` not found: {s}{s}\n", + // `-L` paths are only for loose scripts, and only when the predictable + // adjacent path does not exist. If the predictable file exists but cannot + // be loaded, report that file instead of silently loading another one. + if (!primary_exists and allow_user_fallback) { + const alternate_file_name = try std.fmt.allocPrint( + self.gc.allocator, + "{s}.{s}", .{ - file_basename, - if (builtin.link_libc and builtin.os.tag != .windows) - if (dlerror()) |err| std.mem.span(err) else "" - else - "", - search_report.written(), + native_name, + dynamicLibraryExtension(), }, ); + defer self.gc.allocator.free(alternate_file_name); + + const candidate_names = [_][]const u8{ + library_file_name, + if (!std.mem.eql(u8, library_file_name, alternate_file_name)) alternate_file_name else "", + }; + + for (user_library_paths orelse &[_][]const u8{}) |path| { + for (candidate_names) |candidate_name| { + if (candidate_name.len == 0) { + continue; + } + + const library_path = try std.fs.path.join( + self.gc.allocator, + &.{ + path, + candidate_name, + }, + ); + defer self.gc.allocator.free(library_path); + + const library_exists = self.nativeLibraryExists(library_path); + if (library_exists) { + if (try self.openNativeLibraryAt(library_path, native_name)) |dlib| { + try self.dlib_symbols.put( + self.gc.allocator, + native_name, + dlib, + ); + + break :dl self.dlib_symbols.getEntry(native_name).?; + } + } + + try search_report.writer.print( + " {s} `{s}`\n", + .{ + if (library_exists) "could not load" else "no file", + library_path, + }, + ); + } + } } + self.reporter.reportErrorFmt( + .library_not_found, + self.ast.tokens.get(location), + self.ast.tokens.get(end_location), + "External library `{s}` not found: {s}{s}\n", + .{ + native_name, + if (builtin.link_libc and builtin.os.tag != .windows) + if (dlerror()) |err| std.mem.span(err) else "" + else + "", + search_report.written(), + }, + ); + break :dl null; }) |dlib_entry| { if (try dlib_entry.value_ptr.lookup(self.gc, symbol)) |resolved| { @@ -9691,7 +9650,7 @@ fn importLibSymbol( "Could not find symbol `{s}` in lib `{s}`", .{ symbol, - file_name, + native_name, }, ); } diff --git a/src/Perf.zig b/src/Perf.zig index f2bb574b..20dc57e8 100644 --- a/src/Perf.zig +++ b/src/Perf.zig @@ -150,7 +150,7 @@ pub fn report(self: *Self) void { duration_string, percent, }) catch return; - printBar(out, duration, elapsed, color(component)) catch return; + bz_io.printProgressBar(out, @intCast(duration), @intCast(elapsed), 24, color(component)) catch return; tryPrintChildren(out, children[component_index]) catch return; out.print("\n", .{}) catch return; } @@ -241,23 +241,6 @@ fn formatDuration(buffer: *[32]u8, duration: i128) ![]const u8 { return writer.buffered(); } -fn printBar(out: *std.Io.Writer, duration: i128, total: i128, bar_color: []const u8) !void { - const width = 24; - const filled: usize = @intCast(@min(width, @divTrunc(duration * width, total))); - - try out.print("{s}", .{bar_color}); - for (0..filled) |_| { - try out.writeAll("━"); - } - - try out.writeAll("\x1b[2m"); - for (filled..width) |_| { - try out.writeAll("─"); - } - - try out.writeAll("\x1b[0m"); -} - fn tryPrintChildren(out: *std.Io.Writer, component_children: [component_count]i128) !void { var first = true; diff --git a/src/Runner.zig b/src/Runner.zig index 48b512ad..711bd6ea 100644 --- a/src/Runner.zig +++ b/src/Runner.zig @@ -22,6 +22,7 @@ const Value = @import("value.zig").Value; const o = @import("obj.zig"); const disassembler = @import("disassembler.zig"); const Perf = @import("Perf.zig"); +const Package = @import("Package.zig"); const Runner = @This(); @@ -100,6 +101,7 @@ pub fn init(runner_ptr: *Runner, process: Init, allocator: std.mem.Allocator, fl flavor, ); runner_ptr.parser.perf = perf; + runner_ptr.parser.root_dir = try runner_ptr.cwdRootDir(); runner_ptr.codegen = CodeGen.init( process, @@ -112,8 +114,47 @@ pub fn init(runner_ptr: *Runner, process: Init, allocator: std.mem.Allocator, fl runner_ptr.codegen.perf = perf; } +/// Returns the absolute current directory to use for source-only parsing. +fn cwdRootDir(runner: *Runner) ![]const u8 { + return try std.Io.Dir.cwd().realPathFileAlloc( + runner.process.io, + ".", + runner.gc.allocator, + ); +} + +/// Resolves the package root used for deterministic package imports. +fn resolveRootDir( + runner: *Runner, + provided_root_dir: ?[]const u8, + absolute_file_path: []const u8, +) ![]const u8 { + if (provided_root_dir) |root_dir| { + return try std.Io.Dir.cwd().realPathFileAlloc( + runner.process.io, + root_dir, + runner.gc.allocator, + ); + } + + // If the entry point lives under a `src` directory, its parent is the + // package root. This lets `buzz run src/main.buzz` work without `-r`. + if (std.fs.path.dirname(absolute_file_path)) |dir| { + var it = std.fs.path.componentIterator(dir); + var maybe_component = it.last(); + while (maybe_component) |prev_dir| : (maybe_component = it.previous()) { + if (std.mem.eql(u8, prev_dir.name, "src")) { + return try runner.gc.allocator.dupe(u8, std.fs.path.dirname(prev_dir.path) orelse "."); + } + } + } + + return try runner.cwdRootDir(); +} + pub fn runFile( runner: *Runner, + provided_root_dir: ?[]const u8, file_name: []const u8, args: []const []const u8, ) !u8 { @@ -129,13 +170,22 @@ pub fn runFile( }; defer file.close(runner.process.io); + var absolute_file_path_buffer: [std.Io.Dir.max_path_bytes]u8 = undefined; + const absolute_file_path_len = try file.realPath(runner.process.io, &absolute_file_path_buffer); + const absolute_file_path = try runner.gc.allocator.dupe( + u8, + absolute_file_path_buffer[0..absolute_file_path_len], + ); + + const root_dir = try runner.resolveRootDir(provided_root_dir, absolute_file_path); + const source = try runner.gc.allocator.alloc(u8, (try file.stat(runner.process.io)).size); defer if (runner.vm.debugger == null) runner.gc.allocator.free(source); _ = try file.readPositionalAll(runner.process.io, source, 0); file_io_scope.end(); - if (try runner.parser.parse(source, null, file_name)) |ast| { + if (try runner.parser.parse(source, root_dir, null, absolute_file_path)) |ast| { if (runner.vm.flavor != .Fmt) { const ast_slice = ast.slice(); @@ -172,7 +222,7 @@ pub fn runFile( /// Evaluate source using the current parser and vm state and return the value produced if any /// Used by REPL and Debugger pub fn runSource(self: *Runner, source: []const u8, name: []const u8) !?Value { - if (try self.parser.parse(source, null, name)) |ast| { + if (try self.parser.parse(source, self.parser.root_dir, null, name)) |ast| { const ast_slice = ast.slice(); if (try self.codegen.generate(ast_slice)) |function| { try self.vm.interpret( @@ -200,6 +250,24 @@ pub fn runSource(self: *Runner, source: []const u8, name: []const u8) !?Value { return null; } +/// Run a manifest.buzz and get the produced manifest object +pub fn runManifest(self: *Runner, source: []const u8, name: []const u8) !?Value { + if (try self.parser.parse(source, self.parser.root_dir, null, name)) |ast| { + const ast_slice = ast.slice(); + if (try self.codegen.generate(ast_slice)) |function| { + try self.vm.interpret( + ast_slice, + function, + null, + ); + + return self.vm.globals.items[self.vm.globals_count]; + } + } + + return null; +} + pub fn frameTop(self: *Runner, fiber: *Fiber, frame: *CallFrame) [*]Value { return if (self.vm.currentFrame() == frame) fiber.stack_top @@ -295,7 +363,7 @@ pub fn evaluate(self: *Runner, parent_fiber: *Fiber, parent_frame: *CallFrame, e } // Compile it - if (try self.parser.parse(source.written(), null, "__eval")) |ast| { + if (try self.parser.parse(source.written(), self.parser.root_dir, null, "__eval")) |ast| { const ast_slice = ast.slice(); self.vm.current_ast = ast_slice; // We still use the same AST, but the slice has changed if (try self.codegen.generate(ast_slice)) |function| { diff --git a/src/TypeChecker.zig b/src/TypeChecker.zig index cadff1b2..e3932d92 100644 --- a/src/TypeChecker.zig +++ b/src/TypeChecker.zig @@ -1561,6 +1561,68 @@ fn checkForEach(ast: Ast.Slice, reporter: *Reporter, gc: *GC, _: ?Ast.Node.Index return had_error; } +/// Checks a return value expression against the declared return type of its function. +fn checkReturnValue( + ast: Ast.Slice, + reporter: *Reporter, + gc: *GC, + function_node: Ast.Node.Index, + value: ?Ast.Node.Index, + fallback_location: Ast.Node.Index, +) error{OutOfMemory}!bool { + const type_defs = ast.nodes.items(.type_def); + const locations = ast.nodes.items(.location); + const end_locations = ast.nodes.items(.end_location); + const current_function_type_def = type_defs[function_node].?.resolved_type.?.Function; + + if (value) |value_node| { + // Function return types provide context for inferred return values. + _ = try inferType(ast, reporter, gc, value_node, current_function_type_def.return_type); + const value_type_def = type_defs[value_node]; + + if (value_type_def == null) { + reporter.reportErrorAt( + .undefined, + ast.tokens.get(locations[value_node]), + ast.tokens.get(end_locations[value_node]), + "Unknown type.", + ); + + return true; + } + + if (!current_function_type_def.return_type.eql(value_type_def.?)) { + reporter.reportTypeCheck( + .return_type, + ast.tokens.get(locations[function_node]), + ast.tokens.get(end_locations[function_node]), + current_function_type_def.return_type, + ast.tokens.get(locations[value_node]), + ast.tokens.get(end_locations[value_node]), + value_type_def.?, + "Return value", + ); + + return true; + } + } else if (current_function_type_def.return_type.def_type != .Void) { + reporter.reportTypeCheck( + .return_type, + ast.tokens.get(locations[function_node]), + ast.tokens.get(end_locations[function_node]), + current_function_type_def.return_type, + ast.tokens.get(locations[fallback_location]), + ast.tokens.get(end_locations[fallback_location]), + gc.type_registry.void_type, + "Return value", + ); + + return true; + } + + return false; +} + fn checkFunction(ast: Ast.Slice, reporter: *Reporter, gc: *GC, _: ?Ast.Node.Index, node: Ast.Node.Index) error{OutOfMemory}!bool { const node_components = ast.nodes.items(.components); const type_defs = ast.nodes.items(.type_def); @@ -1630,6 +1692,17 @@ fn checkFunction(ast: Ast.Slice, reporter: *Reporter, gc: *GC, _: ?Ast.Node.Inde } } + if (function_def.lambda and function_def.return_type.def_type != .Void) { + had_error = (try checkReturnValue( + ast, + reporter, + gc, + node, + components.body, + node, + )) or had_error; + } + return had_error; } @@ -2601,53 +2674,15 @@ fn checkResume(ast: Ast.Slice, reporter: *Reporter, gc: *GC, _: ?Ast.Node.Index, fn checkReturn(ast: Ast.Slice, reporter: *Reporter, gc: *GC, current_function_node: ?Ast.Node.Index, node: Ast.Node.Index) error{OutOfMemory}!bool { const components = ast.nodes.items(.components)[node].Return; - const type_defs = ast.nodes.items(.type_def); - const locations = ast.nodes.items(.location); - const end_locations = ast.nodes.items(.end_location); - const current_function_type_def = type_defs[current_function_node.?].?.resolved_type.?.Function; - - var had_error = false; - - if (components.value) |value| { - // Function return types provide context for inferred return values. - _ = try inferType(ast, reporter, gc, value, current_function_type_def.return_type); - const value_type_def = type_defs[value]; - if (value_type_def == null) { - reporter.reportErrorAt( - .undefined, - ast.tokens.get(locations[value]), - ast.tokens.get(end_locations[value]), - "Unknown type.", - ); - had_error = true; - } else if (current_function_node != null and !current_function_type_def.return_type.eql(value_type_def.?)) { - reporter.reportTypeCheck( - .return_type, - ast.tokens.get(locations[current_function_node.?]), - ast.tokens.get(end_locations[current_function_node.?]), - current_function_type_def.return_type, - ast.tokens.get(locations[value]), - ast.tokens.get(end_locations[value]), - value_type_def.?, - "Return value", - ); - had_error = true; - } - } else if (current_function_node != null and current_function_type_def.return_type.def_type != .Void) { - reporter.reportTypeCheck( - .return_type, - ast.tokens.get(locations[current_function_node.?]), - ast.tokens.get(end_locations[current_function_node.?]), - current_function_type_def.return_type, - ast.tokens.get(locations[node]), - ast.tokens.get(end_locations[node]), - gc.type_registry.void_type, - "Return value", - ); - had_error = true; - } - return had_error; + return try checkReturnValue( + ast, + reporter, + gc, + current_function_node.?, + components.value, + node, + ); } fn checkSubscript(ast: Ast.Slice, reporter: *Reporter, gc: *GC, _: ?Ast.Node.Index, node: Ast.Node.Index) error{OutOfMemory}!bool { diff --git a/src/behavior.zig b/src/behavior.zig index 1c1223a5..67a11f8f 100644 --- a/src/behavior.zig +++ b/src/behavior.zig @@ -99,6 +99,7 @@ fn testBehaviors(process: std.process.Init, allocator: std.mem.Allocator, fail_f var failed = false; _ = runner.runFile( + null, file_name.written(), &[_][:0]u8{}, ) catch { @@ -172,7 +173,7 @@ fn testCompileErrors(process: std.process.Init, allocator: std.mem.Allocator, fa const run_result = try std.process.run(allocator, process.io, .{ .argv = &.{ arg0, - "-t", + "test", file_name.written(), }, }); @@ -233,7 +234,7 @@ fn testFuzzCrashes(process: std.process.Init, allocator: std.mem.Allocator, fail .{ .argv = &.{ arg0, - "-t", + "test", file_name.written(), }, .stdout_limit = .unlimited, diff --git a/src/buzz_api.zig b/src/buzz_api.zig index 428853b0..9b856686 100644 --- a/src/buzz_api.zig +++ b/src/buzz_api.zig @@ -646,7 +646,10 @@ export fn bz_run( strings.deinit(self.gc.allocator); } - if (parser.parse(source.?[0..source_len], null, file_name.?[0..file_name_len]) catch null) |ast| { + const script_name = file_name.?[0..file_name_len]; + const root_dir = std.fs.path.dirname(script_name) orelse "."; + + if (parser.parse(source.?[0..source_len], root_dir, null, script_name) catch null) |ast| { const ast_slice = ast.slice(); if (codegen.generate(ast_slice) catch null) |function| { self.interpret(ast_slice, function, null) catch { diff --git a/src/io.zig b/src/io.zig index d6bf5ba3..1e7549d4 100644 --- a/src/io.zig +++ b/src/io.zig @@ -70,6 +70,33 @@ pub fn print(io: Io, comptime fmt: []const u8, args: anytype) void { } } +/// Writes a fixed-width colored progress bar to an existing terminal writer. +pub fn printProgressBar( + out: *std.Io.Writer, + completed: u128, + total: u128, + width: usize, + bar_color: []const u8, +) !void { + const width_int: u128 = @intCast(width); + const filled: usize = if (total == 0) + width + else + @intCast(@min(width_int, @divTrunc(completed * width_int, total))); + + try out.print("{s}", .{bar_color}); + for (0..filled) |_| { + try out.writeAll("━"); + } + + try out.writeAll("\x1b[2m"); + for (filled..width) |_| { + try out.writeAll("─"); + } + + try out.writeAll("\x1b[0m"); +} + pub const AllocatedReader = struct { pub const Error = error{ ReadFailed, diff --git a/src/lib/buffer.buzz b/src/lib/buffer.buzz index 3e6833e4..280396db 100644 --- a/src/lib/buffer.buzz +++ b/src/lib/buffer.buzz @@ -1,7 +1,7 @@ namespace buffer; -import "ffi"; -import "errors"; +import "buzz:ffi"; +import "buzz:errors"; /// Error raised when a buffer is written after reading has started. export object WriteWhileReadingError {} diff --git a/src/lib/fs.buzz b/src/lib/fs.buzz index fc409b8d..f0f4a0e6 100644 --- a/src/lib/fs.buzz +++ b/src/lib/fs.buzz @@ -1,6 +1,6 @@ namespace fs; -import "errors"; +import "buzz:errors"; /// Returns current directory absolute path /// @return current directory diff --git a/src/lib/http.buzz b/src/lib/http.buzz index 9aeb97c0..a9674b79 100644 --- a/src/lib/http.buzz +++ b/src/lib/http.buzz @@ -1,7 +1,7 @@ namespace http; -import "buffer"; -import "errors"; +import "buzz:buffer"; +import "buzz:errors"; /// Errors raised by HTTP client operations. export enum HttpError { diff --git a/src/lib/io.buzz b/src/lib/io.buzz index 3589dbf1..39ac3d4f 100644 --- a/src/lib/io.buzz +++ b/src/lib/io.buzz @@ -1,6 +1,6 @@ namespace io; -import "errors"; +import "buzz:errors"; /// @private extern fun FileOpen( diff --git a/src/lib/manifest.buzz b/src/lib/manifest.buzz new file mode 100644 index 00000000..cfded100 --- /dev/null +++ b/src/lib/manifest.buzz @@ -0,0 +1,92 @@ +namespace manifest; + +/// Supported dependency version constraint operators. +export enum VersionConstraint { + /// Require the candidate version to be lower than the requested version. + lessThan, + /// Require the candidate version to be lower than or equal to the requested version. + equalOrLessThan, + /// Require the candidate version to exactly match the requested version. + equalTo, + /// Require the candidate version to be greater than the requested version. + greaterThan, + /// Require the candidate version to be greater than or equal to the requested version. + equalOrGreater, + /// Compare only the major version and require it to be lower than requested. + majorLessThan, + /// Compare only the major version and require it to be lower than or equal to requested. + majorEqualOrLessThan, + /// Compare only the major version and require it to equal the requested major. + majorEqualTo, + /// Compare only the major version and require it to be greater than requested. + majorGreaterThan, + /// Compare only the major version and require it to be greater than or equal to requested. + majorEqualOrGreater, + /// Compare major and minor versions and require them to be lower than requested. + minorLessThan, + /// Compare major and minor versions and require them to be lower than or equal to requested. + minorEqualOrLessThan, + /// Compare major and minor versions and require them to equal the requested major and minor. + minorEqualTo, + /// Compare major and minor versions and require them to be greater than requested. + minorGreaterThan, + /// Compare major and minor versions and require them to be greater than or equal to requested. + minorEqualOrGreater, +} + +/// Dependency source declared in a package manifest. +export object Source { + /// Git URL, archive URL, or local directory path for the dependency. + url: str, + /// Optional git ref, tag, or commit to fetch. + ref: str?, + /// Optional semantic version constraint used to resolve a git tag. + version: obj{ :VersionConstraint, :int, :int, :int }?, +} + +/// Package manifest describing a buzz package and its dependencies. +export object Manifest { + /// Package name used by package imports. + name: str, + /// Package semantic version. + version: obj{ :int, :int, :int }, + /// Source location of this package. + source: Source, + /// Runtime dependencies by package name. + dependencies: {str: Source} = {}, + /// Development-only dependencies by package name. + devDependencies: {str: Source} = {}, + /// Build commands to run by named build step. + build: {str: [[str]]} = {}, + /// Directory containing the package buzz sources. + rootDir: str = "src", + + /// Optional package summary. + description: str?, + /// Package authors. + authors: [str] = [], + /// Search or classification tags. + tags: [str] = [], + /// Package license identifier or text. + license: str?, + /// Package homepage URL. + homepage: str?, +} + +/// Dependency source resolved and recorded in a manifest lock file. +export object ResolvedSource { + /// Git URL, archive URL, or local directory path used to fetch the dependency. + url: str, + /// Resolved git ref, tag, or commit when applicable. + ref: str?, + /// SHA-256 content hash of the fetched dependency tree. + hash: str, +} + +/// Lock file describing the exact dependency sources fetched for a package. +export object ManifestLock { + /// Locked runtime dependencies by package name. + dependencies: {str: ResolvedSource} = {}, + /// Locked development-only dependencies by package name. + devDependencies: {str: ResolvedSource} = {}, +} diff --git a/src/lib/math.buzz b/src/lib/math.buzz index 79c4e86f..4bf472b6 100644 --- a/src/lib/math.buzz +++ b/src/lib/math.buzz @@ -1,6 +1,6 @@ namespace math; -import "errors"; +import "buzz:errors"; /// @return absolute value of n export extern fun abs(n: double) > double; diff --git a/src/lib/os.buzz b/src/lib/os.buzz index 7d674fa4..7e8deb21 100644 --- a/src/lib/os.buzz +++ b/src/lib/os.buzz @@ -1,6 +1,6 @@ namespace os; -import "errors"; +import "buzz:errors"; /// Sleep for the given amount of ms export extern fun sleep(ms: double) > void; diff --git a/src/lib/serialize.buzz b/src/lib/serialize.buzz index 0820c086..5842b390 100644 --- a/src/lib/serialize.buzz +++ b/src/lib/serialize.buzz @@ -1,7 +1,7 @@ namespace serialize; -import "buffer"; -import "std"; +import "buzz:buffer"; +import "buzz:std"; /// Utility object to manage deserialized data from, for example, decoded JSON export object Boxed { diff --git a/src/lib/static_headers.zig b/src/lib/static_headers.zig index b2c6976a..eea26f08 100644 --- a/src/lib/static_headers.zig +++ b/src/lib/static_headers.zig @@ -17,6 +17,7 @@ pub const fs = Header{ .name = "fs", .path = "fs.buzz" }; pub const gc = Header{ .name = "gc", .path = "gc.buzz" }; pub const http = Header{ .name = "http", .path = "http.buzz" }; pub const io = Header{ .name = "io", .path = "io.buzz" }; +pub const manifest = Header{ .name = "manifest", .path = "manifest.buzz" }; pub const math = Header{ .name = "math", .path = "math.buzz" }; pub const os = Header{ .name = "os", .path = "os.buzz" }; pub const serialize = Header{ .name = "serialize", .path = "serialize.buzz" }; @@ -35,6 +36,7 @@ pub const all = [_]Header{ gc, http, io, + manifest, math, os, serialize, diff --git a/src/lib/static_libraries.zig b/src/lib/static_libraries.zig index c193a563..915a4e3b 100644 --- a/src/lib/static_libraries.zig +++ b/src/lib/static_libraries.zig @@ -25,6 +25,7 @@ pub const all = [_]Library{ .{ .header = static_headers.gc, .zig_path = "buzz_gc.zig", .wasm_native = true }, .{ .header = static_headers.http, .zig_path = "buzz_http.zig", .wasm_native = false }, .{ .header = static_headers.io, .zig_path = "buzz_io.zig", .wasm_native = false }, + .{ .header = static_headers.manifest, .zig_path = null, .wasm_native = false }, .{ .header = static_headers.math, .zig_path = "buzz_math.zig", .wasm_native = true }, .{ .header = static_headers.os, .zig_path = "buzz_os.zig", .wasm_native = false }, .{ .header = static_headers.serialize, .zig_path = "buzz_serialize.zig", .wasm_native = true }, diff --git a/src/lib/testing.buzz b/src/lib/testing.buzz index 0fad6a13..9f4a817a 100644 --- a/src/lib/testing.buzz +++ b/src/lib/testing.buzz @@ -1,7 +1,7 @@ namespace testing; -import "os"; -import "io"; +import "buzz:os"; +import "buzz:io"; enum Color { // attributes diff --git a/src/lib/toml.buzz b/src/lib/toml.buzz index 3b14bb64..a688ae3b 100644 --- a/src/lib/toml.buzz +++ b/src/lib/toml.buzz @@ -1,6 +1,6 @@ namespace toml; -import "std"; +import "buzz:std"; enum TokenTag { BareKey, diff --git a/src/lsp.zig b/src/lsp.zig index a80749eb..e8ffdc38 100644 --- a/src/lsp.zig +++ b/src/lsp.zig @@ -10,6 +10,7 @@ const Parser = @import("Parser.zig"); const Reporter = @import("Reporter.zig"); const Scanner = @import("Scanner.zig"); const CodeGen = @import("Codegen.zig"); +const Package = @import("Package.zig"); const Token = @import("Token.zig"); const Renderer = @import("renderer.zig").Renderer; const o = @import("obj.zig"); @@ -53,6 +54,12 @@ const MemberDocblockKey = struct { } }; +/// Package document kind that needs an LSP-only parser wrapper. +const PackageDocumentKind = enum { + manifest, + manifest_lock, +}; + const Document = struct { pub const Definition = struct { location: lsp.types.Location, @@ -62,7 +69,12 @@ const Document = struct { arena: std.heap.ArenaAllocator, process: std.process.Init, + /// Client document text, unchanged by LSP-only parsing wrappers. src: [:0]const u8, + /// Source passed to the parser. Manifest documents may use wrapped text. + parse_src: [:0]const u8, + /// True when the parser source includes an LSP-only manifest wrapper. + is_wrapped_manifest: bool = false, /// Not owned by this struct uri: []const u8, ast: Ast, @@ -126,6 +138,15 @@ const Document = struct { const allocator = arena.allocator(); const owned_src = try allocator.dupeZ(u8, src); + const owned_uri = try allocator.dupe(u8, uri); + const package_document_kind = try packageDocumentKind(allocator, owned_uri, owned_src); + const parse_src = if (package_document_kind) |kind| + switch (kind) { + .manifest => try allocator.dupeZ(u8, try Package.wrapManifest(allocator, owned_src)), + .manifest_lock => try allocator.dupeZ(u8, try Package.wrapManifestLock(allocator, owned_src)), + } + else + owned_src; var gc = try GC.init(allocator); gc.type_registry = TypeRegistry.init(&gc) catch return error.OutOfMemory; @@ -149,15 +170,34 @@ const Document = struct { false, ); - const owned_uri = try allocator.dupe(u8, uri); const std_lib_script_name = staticScriptNameFromUri(owned_uri); const document_script_name = std_lib_script_name orelse (try localPathFromFileUri(allocator, owned_uri)) orelse owned_uri; + const document_root_dir = root_dir: { + if (std_lib_script_name != null) { + break :root_dir try std.Io.Dir.cwd().realPathFileAlloc(process.io, ".", allocator); + } + + if (std.fs.path.dirname(document_script_name)) |dir| { + var it = std.fs.path.componentIterator(dir); + var maybe_component = it.last(); + while (maybe_component) |prev_dir| : (maybe_component = it.previous()) { + if (std.mem.eql(u8, prev_dir.name, "src")) { + break :root_dir try allocator.dupe(u8, std.fs.path.dirname(prev_dir.path) orelse "."); + } + } + + break :root_dir try allocator.dupe(u8, dir); + } + + break :root_dir try std.Io.Dir.cwd().realPathFileAlloc(process.io, ".", allocator); + }; // If there's parsing error `parse` does not return the AST, but we can still use it however incomplete const ast = (parser.parse( - owned_src, + parse_src, + document_root_dir, owned_uri, document_script_name, ) catch parser.ast) orelse @@ -178,6 +218,8 @@ const Document = struct { .arena = arena, .process = process, .src = owned_src, + .parse_src = parse_src, + .is_wrapped_manifest = package_document_kind != null, .uri = owned_uri, .ast = ast, .errors = errors.items, @@ -206,6 +248,10 @@ const Document = struct { return false; } + if (self.is_wrapped_manifest) { + return token.line != 0; + } + return true; } @@ -257,14 +303,22 @@ const Document = struct { continue; } - try self.completion_labels.put(allocator, name, {}); - const location = locations[node]; const end_location = end_locations[node]; if (location >= ast_slice.tokens.len or end_location >= ast_slice.tokens.len) { continue; } + if (!self.isClientToken(ast_slice.tokens.get(location))) { + continue; + } + + if (tags[node] == .VarDeclaration and + !self.isClientToken(ast_slice.tokens.get(components[node].VarDeclaration.name))) + { + continue; + } + // Document symbols must only describe the document being served. // Imported nodes can share the AST backing lists but belong to // another script. @@ -273,6 +327,8 @@ const Document = struct { continue; } + try self.completion_labels.put(allocator, name, {}); + switch (tags[node]) { .VarDeclaration => { const comp = components[node].VarDeclaration; @@ -1167,6 +1223,10 @@ const Document = struct { try type_def.toStringWithoutUnresolved(&inlay.writer, false); if (suffix) |sx| try inlay.writer.writeAll(sx); + if (!self.document.isClientToken(location)) { + return; + } + try self.document.inlay_hints.append( allocator, .{ @@ -1377,224 +1437,6 @@ const Document = struct { } }; -/// Stable argv backing storage for LSP unit-test process initialization. -const lsp_test_argv = [_][*:0]const u8{"buzz_lsp_test"}; - -/// Creates a minimal process context for document-only LSP unit tests. -fn initLspTestProcess( - allocator: std.mem.Allocator, - process_arena: *std.heap.ArenaAllocator, - environ_map: *std.process.Environ.Map, -) !std.process.Init { - return .{ - .minimal = .{ - .args = .{ .vector = &lsp_test_argv }, - .environ = std.testing.environ, - }, - .arena = process_arena, - .gpa = allocator, - .io = std.testing.io, - .environ_map = environ_map, - .preopens = try std.process.Preopens.init(process_arena.allocator()), - }; -} - -/// Asserts that hover markup exists and contains the expected doc text. -fn expectHoverDoc( - doc: *Document, - position: lsp.types.Position, - expected: []const u8, - unexpected: []const u8, -) !void { - const hover = try doc.hoverMarkupAtPosition(position); - try std.testing.expect(hover != null); - try std.testing.expect(std.mem.indexOf(u8, hover.?, expected) != null); - try std.testing.expect(std.mem.indexOf(u8, hover.?, unexpected) == null); -} - -test "document inlay hints tolerate incomplete function signatures" { - const allocator = std.testing.allocator; - - var process_arena = std.heap.ArenaAllocator.init(allocator); - defer process_arena.deinit(); - - var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); - defer environ_map.deinit(); - - const process = try initLspTestProcess(allocator, &process_arena, &environ_map); - - const source = - \\fun bad() > { - \\ return 0; - \\} - \\ - ; - var doc = try Document.init( - process, - allocator, - source, - "file:///tmp/bad-fun-signature.buzz", - ); - defer doc.deinit(); - - try std.testing.expect(doc.errors.len > 0); -} - -test "document range lookup tolerates incomplete reserved parser nodes" { - const allocator = std.testing.allocator; - - var process_arena = std.heap.ArenaAllocator.init(allocator); - defer process_arena.deinit(); - - var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); - defer environ_map.deinit(); - - const process = try initLspTestProcess(allocator, &process_arena, &environ_map); - - const source = - \\if ( - \\ - ; - var doc = try Document.init( - process, - allocator, - source, - "file:///tmp/incomplete-if.buzz", - ); - defer doc.deinit(); - - try std.testing.expect(doc.errors.len > 0); - - for (doc.ast.nodes.items(.location), doc.ast.nodes.items(.end_location)) |location, end_location| { - if (location == 0) { - continue; - } - - try std.testing.expect(location < doc.ast.tokens.len); - try std.testing.expect(end_location < doc.ast.tokens.len); - } - - _ = doc.findNodeContainingRange(.{ - .start = .{ .line = 0, .character = 0 }, - .end = .{ .line = 0, .character = 1 }, - }); -} - -test "document hover uses member docblocks at object and enum access sites" { - const allocator = std.testing.allocator; - - var process_arena = std.heap.ArenaAllocator.init(allocator); - defer process_arena.deinit(); - - var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); - defer environ_map.deinit(); - - const process = try initLspTestProcess(allocator, &process_arena, &environ_map); - - const source = - \\/// Widget docs. - \\object Widget { - \\ /// Name field docs. - \\ name: str = "demo", - \\ - \\ /// Title method docs. - \\ fun title() => this.name; - \\} - \\ - \\/// Mode docs. - \\enum Mode { - \\ /// Fast case docs. - \\ fast, - \\} - \\ - \\final widget = Widget{}; - \\final selected_name = widget.name; - \\final selected_title = widget.title(); - \\final selected_mode = Mode.fast; - \\final initialized = Widget { name = "from init" }; - \\ - ; - - var doc = try Document.init( - process, - allocator, - source, - "file:///tmp/member-hover.buzz", - ); - defer doc.deinit(); - - try std.testing.expectEqual(@as(usize, 0), doc.errors.len); - - try expectHoverDoc(&doc, .{ .line = 1, .character = 8 }, "Widget docs.", "Name field docs."); - try expectHoverDoc(&doc, .{ .line = 10, .character = 6 }, "Mode docs.", "Fast case docs."); - try expectHoverDoc(&doc, .{ .line = 16, .character = 30 }, "Name field docs.", "Widget docs."); - const hover_cache_count = doc.token_hover.count(); - try expectHoverDoc(&doc, .{ .line = 16, .character = 30 }, "Name field docs.", "Widget docs."); - try std.testing.expectEqual(hover_cache_count, doc.token_hover.count()); - try expectHoverDoc(&doc, .{ .line = 17, .character = 32 }, "Title method docs.", "Widget docs."); - try expectHoverDoc(&doc, .{ .line = 18, .character = 28 }, "Fast case docs.", "Mode docs."); - try expectHoverDoc(&doc, .{ .line = 19, .character = 22 }, "Widget docs.", "Name field docs."); - try expectHoverDoc(&doc, .{ .line = 19, .character = 31 }, "Name field docs.", "Widget docs."); - const init_hover_cache_count = doc.token_hover.count(); - try expectHoverDoc(&doc, .{ .line = 19, .character = 31 }, "Name field docs.", "Widget docs."); - try std.testing.expectEqual(init_hover_cache_count, doc.token_hover.count()); -} - -test "document owns source text across repeated reloads" { - const allocator = std.testing.allocator; - - var process_arena = std.heap.ArenaAllocator.init(allocator); - defer process_arena.deinit(); - - var environ_map = try std.process.Environ.createMap(std.testing.environ, allocator); - defer environ_map.deinit(); - - const process = try initLspTestProcess(allocator, &process_arena, &environ_map); - - const cases = [_]struct { - source: []const u8, - label: []const u8, - }{ - .{ - .source = "final first = 1;\n", - .label = "first", - }, - .{ - .source = "final second = 2;\n", - .label = "second", - }, - .{ - .source = "final third = 3;\n", - .label = "third", - }, - }; - - for (cases, 0..) |case, index| { - const caller_text = try allocator.dupe(u8, case.source); - defer allocator.free(caller_text); - - var uri_buf: [64]u8 = undefined; - const uri = try std.fmt.bufPrint( - &uri_buf, - "file:///tmp/reload-{}.buzz", - .{index}, - ); - - var doc = try Document.init( - process, - allocator, - caller_text, - uri, - ); - defer doc.deinit(); - - @memset(caller_text, 'x'); - - try std.testing.expectEqualStrings(case.source, doc.src); - try std.testing.expect(doc.completion_labels.get(case.label) != null); - } -} - extern fn getpid() std.os.linux.pid_t; pub fn main(init: std.process.Init) !void { @@ -2560,6 +2402,28 @@ fn tokenToRange(ast: Ast.Slice, location: Ast.TokenIndex, end_location: Ast.Toke }; } +/// Returns the package wrapper kind for shallow bare manifest objects. +fn packageDocumentKind(allocator: std.mem.Allocator, uri: []const u8, source: []const u8) !?PackageDocumentKind { + const file_name = if (try localPathFromFileUri(allocator, uri)) |path| + std.fs.path.basename(path) + else + std.fs.path.basename(uri); + + if (!std.mem.startsWith(u8, std.mem.trim(u8, source, " \n\r\t"), ".{")) { + return null; + } + + if (std.mem.eql(u8, file_name, Package.MANIFEST)) { + return .manifest; + } + + if (std.mem.eql(u8, file_name, Package.MANIFEST_LOCK)) { + return .manifest_lock; + } + + return null; +} + /// Converts a local `file://` document URI into the script path used by parser semantics. /// For example, `file:///tmp/project/main.buzz` becomes `/tmp/project/main.buzz`. fn localPathFromFileUri(allocator: std.mem.Allocator, uri: []const u8) !?[]const u8 { diff --git a/src/main.zig b/src/main.zig index 81ac1c12..e039d5a5 100644 --- a/src/main.zig +++ b/src/main.zig @@ -24,6 +24,7 @@ const Renderer = @import("renderer.zig").Renderer; const io = @import("io.zig"); const Runner = @import("Runner.zig"); const Perf = @import("Perf.zig"); +const Package = @import("Package.zig"); pub export const initRepl_export = wasm_repl.initRepl; pub export const runLine_export = wasm_repl.runLine; @@ -33,6 +34,77 @@ pub const os = if (is_wasm) else std.os; +const SubCommand = enum { + @"test", + check, + fetch, + format, + help, + init, + run, + @"run-script", + version, +}; + +/// Top-level command descriptions shown by `buzz help`. +const command_summaries = .{ + .check = .{ .name = "check", .description = "Parse and type-check a buzz script without running it." }, + .fetch = .{ .name = "fetch", .description = "Prepare package vendor links from a manifest." }, + .format = .{ .name = "format", .description = "Format a buzz script." }, + .help = .{ .name = "help", .description = "Show global or command-specific help." }, + .init = .{ .name = "init", .description = "Create a minimal buzz package in the current directory." }, + .run = .{ .name = "run", .description = "Run src/main.buzz from the current package." }, + .@"run-script" = .{ .name = "run-script", .description = "Run a standalone buzz script by path." }, + .@"test" = .{ .name = "test", .description = "Run tests from a buzz script." }, + .version = .{ .name = "version", .description = "Print buzz version information." }, +}; + +const main_params = clap.parseParamsComptime( + \\ +); + +const test_params = clap.parseParamsComptime( + \\-L, --library ... Add search path for external libraries + \\-r, --root-dir Root dir for package resolution + \\ Script to test +); + +const check_params = clap.parseParamsComptime( + \\-L, --library ... Add search path for external libraries + \\-r, --root-dir Root dir for package resolution + \\ Script to check +); + +const format_params = clap.parseParamsComptime( + \\--line-width Formatter line width (defaults to 80) + \\-L, --library ... Add search path for external libraries + \\-r, --root-dir Root dir for package resolution + \\ Script to format +); + +const run_params = clap.parseParamsComptime( + \\... Arguments to pass to src/main.buzz +); + +const run_script_params = clap.parseParamsComptime( + \\-L, --library ... Add search path for external libraries + \\-r, --root-dir Root dir for package resolution + \\ Script to run + \\... Arguments to pass to the script +); + +const help_params = clap.parseParamsComptime( + \\ Command for which you want help +); + +const fetch_params = clap.parseParamsComptime( + \\-m, --manifest Path to manifest file (defaults to `./manifest.buzz`) +); + +const main_parsers = .{ + .command = clap.parsers.enumeration(SubCommand), +}; + pub fn main(provided_init: Init) u8 { if (is_wasm) unreachable; @@ -48,30 +120,31 @@ pub fn main(provided_init: Init) u8 { // FIXME: Use process.allocator everywhere? init.gpa = allocator; - const params = comptime clap.parseParamsComptime( - \\-h, --help Show help and exit - \\-t, --test Run test blocks in provided script - \\-f, --fmt Reformat script, output the result to stdout - \\--line-width Formatter line width, only valid with --fmt (defaults to 80) - \\-c, --check Check script for error without running it - \\-v, --version Print version and exit - \\-L, --library ... Add search path for external libraries - \\... Script to run followed by its eventual arguments - \\ - ); - var stderr = io.stderrWriter(init.io); var stdout = io.stdoutWriter(init.io); + var arg_iter = init.minimal.args.iterateAllocator(init.gpa) catch |err| { + stderr.interface.print( + "Could not initialize command line arguments: {s}\n", + .{@errorName(err)}, + ) catch @panic("Could not initialize command line arguments"); + return 1; + }; + defer arg_iter.deinit(); + + _ = arg_iter.next(); + var diag = clap.Diagnostic{}; - var res = clap.parse( + var res = clap.parseEx( clap.Help, - ¶ms, - clap.parsers.default, - init.minimal.args, + &main_params, + main_parsers, + &arg_iter, .{ .allocator = allocator, .diagnostic = &diag, + // Stop parsing after we read the subcommand + .terminating_positional = 0, }, ) catch |err| { // Report useful error and exit @@ -80,107 +153,531 @@ pub fn main(provided_init: Init) u8 { }; defer res.deinit(); - if (res.args.version == 1) { - _repl.printBanner(&stdout.interface, true); + // No arguments, we run the REPL + if (res.positionals[0]) |command| { + return switch (command) { + .@"test" => run( + init, + allocator, + command, + clap.parseEx( + clap.Help, + &test_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }, + .{}, + ), + .check => run( + init, + allocator, + command, + clap.parseEx( + clap.Help, + &check_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }, + .{}, + ), + .format => { + const sub_res = clap.parseEx( + clap.Help, + &format_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }; - return 0; - } + return run( + init, + allocator, + command, + sub_res, + renderer_options: { + if (sub_res.args.@"line-width") |line_width| { + if (line_width < Renderer.min_line_width) { + stderr.interface.print( + "--line-width must be at least {}\n", + .{Renderer.min_line_width}, + ) catch {}; + return 1; + } - if (res.args.help == 1) { - io.print(init.io, "👨‍🚀 buzz A small/lightweight typed scripting language\n\nUsage: buzz ", .{}); + break :renderer_options .{ .line_width = line_width }; + } else break :renderer_options .{}; + }, + ); + }, + .run => { + const sub_res = clap.parseEx( + clap.Help, + &run_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }; - clap.usage( - &stderr.interface, - clap.Help, - ¶ms, - ) catch return 1; + std.Io.Dir.cwd().access(init.io, Package.MANIFEST, .{ .read = true }) catch |err| { + stderr.interface.print( + "Could not find `{s}` in current directory: {s}\n", + .{ + Package.MANIFEST, + @errorName(err), + }, + ) catch @panic("Could not check package manifest"); + return 1; + }; - io.print(init.io, "\n\n", .{}); + var perf: ?Perf = if (BuildOptions.show_perf) Perf.init(init.io) else null; + defer if (perf) |*p| p.report(); - clap.help( - &stderr.interface, - clap.Help, - ¶ms, - .{ - .description_on_new_line = false, - .description_indent = 4, - .spacing_between_parameters = 0, + var runner: Runner = undefined; + runner.init( + init, + allocator, + .Run, + null, + if (perf) |*p| p else null, + ) catch { + return 1; + }; + defer runner.deinit(); + + return runner.runFile( + ".", + "src/main.buzz", + sub_res.positionals[0], + ) catch { + return 1; + }; }, - ) catch return 1; + .@"run-script" => run( + init, + allocator, + command, + clap.parseEx( + clap.Help, + &run_script_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }, + .{}, + ), + .fetch => { + const sub_res = clap.parseEx( + clap.Help, + &fetch_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }; + + const manifest_path = sub_res.args.manifest orelse ("./" ++ Package.MANIFEST); - return 0; + const manifest = Package.loadManifest( + init, + allocator, + manifest_path, + ) catch |err| { + stderr.interface.print( + "Could not load manifest at `{s}`: {s}\n", + .{ + manifest_path, + @errorName(err), + }, + ) catch @panic("Could not load manifest"); + return 1; + }; + + const manifest_real_path = std.Io.Dir.cwd().realPathFileAlloc( + init.io, + manifest_path, + allocator, + ) catch |err| { + stderr.interface.print( + "Could not resolve manifest root at `{s}`: {s}\n", + .{ + manifest_path, + @errorName(err), + }, + ) catch @panic("Could not resolve manifest root"); + return 1; + }; + defer allocator.free(manifest_real_path); + + const manifest_root = std.fs.path.dirname(manifest_real_path) orelse "."; + + Package.ensureSelfVendorSymlink( + init, + manifest_root, + manifest.name, + ) catch |err| { + if (builtin.os.tag == .windows) { + switch (err) { + error.WindowsSymlinkPermission => { + stderr.interface.print( + "Could not create self vendor link for `{s}`: Windows requires Developer Mode or an elevated shell to create directory symlinks.\n", + .{manifest.name}, + ) catch @panic("Could not create self vendor link"); + return 1; + }, + else => {}, + } + } + + stderr.interface.print( + "Could not create self vendor link for `{s}`: {s}\n", + .{ + manifest.name, + @errorName(err), + }, + ) catch @panic("Could not create self vendor link"); + return 1; + }; + + if (manifest.fetch(init, manifest_root) catch |err| { + stderr.interface.print( + "Could fetch dependencies for `{s}`: {s}\n", + .{ + manifest.name, + @errorName(err), + }, + ) catch @panic("Could not create self vendor link"); + return 1; + }) { + return 0; + } + + return 1; + }, + .help => { + const sub_res = clap.parseEx( + clap.Help, + &help_params, + clap.parsers.default, + &arg_iter, + .{ + .allocator = allocator, + .diagnostic = &diag, + }, + ) catch |err| { + // Report useful error and exit + diag.report(&stderr.interface, err) catch {}; + return 1; + }; + + return help( + init, + &stderr.interface, + sub_res.positionals[0], + ); + }, + .init => return initPackage(init), + .version => { + _repl.printBanner(&stdout.interface, true); + + return 0; + }, + }; + } else { + repl(init, allocator) catch { + return 1; + }; } - if (res.args.library.len > 0) { + return 0; +} + +fn initPackage(init: Init) u8 { + var stderr = io.stderrWriter(init.io); + + Package.init(init) catch |err| { + if (builtin.os.tag == .windows) { + switch (err) { + error.WindowsSymlinkPermission => { + stderr.interface.print("Could not initialize buzz package: Windows requires Developer Mode or an elevated shell to create directory symlinks.\n", .{}) catch + @panic("Could not init buzz package"); + return 1; + }, + else => {}, + } + } + + switch (err) { + error.ManifestAlreadyCreated => stderr.interface.print("A `manifest.buzz` file already exists\n", .{}) catch + @panic("Could not init buzz package"), + else => stderr.interface.print("Could not initialize buzz package: {s}\n", .{@errorName(err)}) catch + @panic("Could not init buzz package"), + } + + return 1; + }; + + return 0; +} + +fn run( + init: Init, + allocator: std.mem.Allocator, + command: SubCommand, + sub_res: anytype, + renderer_options: Renderer.Options, +) u8 { + if (command == .@"run-script" and sub_res.positionals[0] == null) { + var stderr = io.stderrWriter(init.io); + stderr.interface.writeAll("Missing script to run\n") catch {}; + return 1; + } + + var perf: ?Perf = if (BuildOptions.show_perf) Perf.init(init.io) else null; + defer if (perf) |*p| p.report(); + + var runner: Runner = undefined; + runner.init( + init, + allocator, + switch (command) { + .@"test" => .Test, + .check => .Check, + .format => .Fmt, + .run, .@"run-script" => .Run, + else => unreachable, + }, + null, + if (perf) |*p| p else null, + ) catch { + return 1; + }; + defer runner.deinit(); + runner.renderer_options = renderer_options; + + if (sub_res.args.library.len > 0) { var list = std.ArrayList([]const u8).empty; - for (res.args.library) |path| { + for (sub_res.args.library) |path| { list.append(allocator, path) catch return 1; } Parser.user_library_paths = list.toOwnedSlice(allocator) catch return 1; } - var renderer_options: Renderer.Options = .{}; - if (res.args.@"line-width") |line_width| { - if (res.args.fmt != 1) { - stderr.interface.print("--line-width is only valid with -f/--fmt\n", .{}) catch {}; - return 1; - } + return runner.runFile( + sub_res.args.@"root-dir", + sub_res.positionals[0] orelse &.{}, + if (sub_res.positionals.len > 1) sub_res.positionals[1] else &.{}, + ) catch { + return 1; + }; +} - if (line_width < Renderer.min_line_width) { - stderr.interface.print( - "--line-width must be at least {}\n", - .{Renderer.min_line_width}, - ) catch {}; - return 1; - } +fn help(init: Init, stderr: *std.Io.Writer, subcommand_opt: ?[]const u8) u8 { + io.print(init.io, "👨‍🚀 buzz A small/lightweight typed scripting language\n\nUsage: buzz ", .{}); - renderer_options.line_width = line_width; - } + if (subcommand_opt) |subcommand| { + io.print(init.io, "{s} ", .{subcommand}); - const flavor: RunFlavor = if (res.args.check == 1) - .Check - else if (res.args.@"test" == 1) - .Test - else if (res.args.fmt == 1) - .Fmt - else if (res.positionals[0].len == 0) - .Repl - else - .Run; + if (std.mem.eql(u8, subcommand, "test")) { + clap.usage( + stderr, + clap.Help, + &test_params, + ) catch return 1; - if (!is_wasm and flavor == .Repl) { - repl(init, allocator) catch { - return 1; - }; - } else if (!is_wasm and res.positionals[0].len > 0) { - var perf: ?Perf = if (BuildOptions.show_perf) Perf.init(init.io) else null; - defer if (perf) |*p| p.report(); - - var runner: Runner = undefined; - runner.init( - init, - allocator, - flavor, - null, - if (perf) |*p| p else null, - ) catch { - return 1; - }; - defer runner.deinit(); - runner.renderer_options = renderer_options; + io.print(init.io, "\n\n", .{}); - return runner.runFile( - res.positionals[0][0], - res.positionals[0][1..], - ) catch { - return 1; - }; - } else if (is_wasm) { - io.print(init.io, "NYI wasm repl", .{}); + clap.help( + stderr, + clap.Help, + &test_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "check")) { + clap.usage( + stderr, + clap.Help, + &check_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &check_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "format")) { + clap.usage( + stderr, + clap.Help, + &format_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &format_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "run")) { + clap.usage( + stderr, + clap.Help, + &run_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &run_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "run-script")) { + clap.usage( + stderr, + clap.Help, + &run_script_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &run_script_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "fetch")) { + clap.usage( + stderr, + clap.Help, + &fetch_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &fetch_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "help")) { + clap.usage( + stderr, + clap.Help, + &help_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + clap.help( + stderr, + clap.Help, + &help_params, + .{ + .description_on_new_line = false, + .description_indent = 4, + .spacing_between_parameters = 0, + }, + ) catch return 1; + } else if (std.mem.eql(u8, subcommand, "init")) { + io.print(init.io, "\n{s}\n", .{command_summaries.init.description}); + } else if (std.mem.eql(u8, subcommand, "version")) { + io.print(init.io, "\n{s}\n", .{command_summaries.version.description}); + } } else { - io.print(init.io, "Nothing to run", .{}); + clap.usage( + stderr, + clap.Help, + &main_params, + ) catch return 1; + + io.print(init.io, "\n\n", .{}); + + io.print(init.io, "Commands:\n", .{}); + inline for (std.meta.fields(@TypeOf(command_summaries))) |field| { + const command = @field(command_summaries, field.name); + io.print(init.io, " {s:<11} {s}\n", .{ + command.name, + command.description, + }); + } + io.print(init.io, "\nUse `buzz help ` for command-specific help.\n", .{}); } return 0; diff --git a/src/obj.zig b/src/obj.zig index 500638f3..555ad947 100644 --- a/src/obj.zig +++ b/src/obj.zig @@ -14,6 +14,7 @@ const GC = @import("GC.zig"); const TypeRegistry = @import("TypeRegistry.zig"); const v = @import("value.zig"); const Integer = v.Integer; +const Double = v.Double; const Value = v.Value; const Token = @import("Token.zig"); const is_wasm = builtin.cpu.arch.isWasm(); @@ -1457,22 +1458,6 @@ pub const ObjObjectInstance = struct { try gc.markObjDirty(&self.obj); } - /// Should not be called by runtime when possible - pub fn setFieldByName(self: *Self, gc: *GC, key: *ObjString, value: Value) !void { - const object_def = self.type_def.resolved_type.?.ObjectInstance.resolved_type.?.Object; - const index = std.mem.indexOf( - *ObjString, - object_def.fields.keys(), - key, - ); - - self.setField( - gc, - index, - value, - ); - } - pub fn init( vm: *VM, object: ?*ObjObject, @@ -1531,6 +1516,38 @@ pub const ObjObjectInstance = struct { return false; } + + pub fn getFieldValue(self: *Self, comptime field_name: []const u8) Value { + const idx = self.type_def.resolved_type.?.ObjectInstance + .of.resolved_type.?.Object + .fields.get(field_name).?.index; + + return self.fields[idx]; + } + + /// Utility function to read a buzz object from zig, will break if field does not exists or type mismatch on the buzz side + pub fn get(self: *Self, comptime T: type, comptime field_name: []const u8) T { + const field = self.getFieldValue(field_name); + const is_optional = @typeInfo(T) == .optional; + + if (is_optional and field.isNull()) return null; + + const UT = if (is_optional) + @typeInfo(T).optional.child + else + T; + + return switch (UT) { + []const u8 => field.obj().cast(ObjString, .String).?.string, + Integer => if (field.isObj()) + field.obj().cast(ObjEnumInstance, .EnumInstance).?.case + else + field.integer(), + Double => field.double(), + bool => field.boolean(), + else => @compileError("Only scalar types are possible, got " ++ @typeName(T)), + }; + } }; /// FFI struct or union diff --git a/src/repl.zig b/src/repl.zig index bc21a791..f965a278 100644 --- a/src/repl.zig +++ b/src/repl.zig @@ -229,7 +229,7 @@ pub fn repl(process: std.process.Init, allocator: std.mem.Allocator) !void { } // Import std and debug as commodity - _ = runner.runSource("import \"std\"; import \"debug\";", "REPL") catch unreachable; + _ = runner.runSource("import \"buzz:std\"; import \"buzz:debug\";", "REPL") catch unreachable; var previous_global_top = runner.vm.globals_count; var previous_parser_globals = try runner.parser.globals.clone(allocator); @@ -305,7 +305,7 @@ pub fn repl(process: std.process.Init, allocator: std.mem.Allocator) !void { } const expr = expr: { - const maybe_ast = runner.parser.parse(source, null, "REPL") catch |err| { + const maybe_ast = runner.parser.parse(source, runner.parser.root_dir, null, "REPL") catch |err| { if (BuildOptions.debug) { stderr.print("Failed with error {}\n", .{err}) catch unreachable; } diff --git a/src/tests/fmt.zig b/src/tests/fmt.zig index 30b4c07d..7495ea3a 100644 --- a/src/tests/fmt.zig +++ b/src/tests/fmt.zig @@ -81,7 +81,7 @@ fn testFmt(process: std.process.Init, prefix: []const u8, entry: std.Io.Dir.Entr var result = std.Io.Writer.Allocating.init(allocator); - if (parser.parse(source, file_name, file_name) catch null) |ast| { + if (parser.parse(source, ".", null, file_name) catch null) |ast| { try Renderer.render( allocator, &result.writer, @@ -170,7 +170,7 @@ fn expectFmtSource(source: []const u8, expected: []const u8, options: Renderer.O var result = std.Io.Writer.Allocating.init(allocator); - if (parser.parse(source, "fmt-test.buzz", "fmt-test.buzz") catch null) |ast| { + if (parser.parse(source, ".", null, "fmt-test.buzz") catch null) |ast| { try Renderer.render( allocator, &result.writer, @@ -185,7 +185,7 @@ fn expectFmtSource(source: []const u8, expected: []const u8, options: Renderer.O } const width_source = - \\import "std"; + \\import "buzz:std"; \\ \\fun combine(first_argument_name: int, second_argument_name: int, third_argument_name: int) > int { \\ return first_argument_name + second_argument_name + third_argument_name; @@ -203,7 +203,7 @@ const width_source = test "fmt wraps long expressions at default line width" { try expectFmtSource( width_source, - \\import "std"; + \\import "buzz:std"; \\ \\fun combine( \\ first_argument_name: int, @@ -241,7 +241,7 @@ test "fmt wraps long expressions at default line width" { test "fmt line width option controls comma wrapping" { try expectFmtSource( width_source, - \\import "std"; + \\import "buzz:std"; \\ \\fun combine( \\ first_argument_name: int, @@ -287,7 +287,7 @@ test "fmt line width option controls comma wrapping" { test "fmt custom wide line width keeps short-enough expressions inline" { try expectFmtSource( width_source, - \\import "std"; + \\import "buzz:std"; \\ \\fun combine(first_argument_name: int, second_argument_name: int, third_argument_name: int) > int { \\ return first_argument_name + second_argument_name + third_argument_name; @@ -617,14 +617,14 @@ test "fmt wraps function signature suffixes after their prefixes" { test "fmt wraps member chains before the member separator" { try expectFmtSource( - \\import "std"; + \\import "buzz:std"; \\ \\test "fmt" { \\ std\assert([ 1, 2, 3 ].copyImmutable().copyImmutable().copyImmutable().copyImmutable().len() == 3); \\} \\ , - \\import "std"; + \\import "buzz:std"; \\ \\test "fmt" { \\ std\assert( @@ -711,7 +711,7 @@ test "fmt does not render comments while inside interpolated strings" { var result = std.Io.Writer.Allocating.init(allocator); - if (parser.parse(source, "fmt-test.buzz", "fmt-test.buzz") catch null) |parsed| { + if (parser.parse(source, ".", null, "fmt-test.buzz") catch null) |parsed| { var ast = parsed; const token_tags = ast.tokens.items(.tag); const lexemes = ast.tokens.items(.lexeme); @@ -839,7 +839,7 @@ test "fmt tolerates stale function type metadata" { var result = std.Io.Writer.Allocating.init(allocator); - if (parser.parse(source, "fmt-test.buzz", "fmt-test.buzz") catch null) |parsed| { + if (parser.parse(source, ".", null, "fmt-test.buzz") catch null) |parsed| { var ast = parsed; const tags = ast.nodes.items(.tag); const type_defs = ast.nodes.items(.type_def); diff --git a/src/update_std_docs.zig b/src/update_std_docs.zig index 9625f8b2..f41a9d50 100644 --- a/src/update_std_docs.zig +++ b/src/update_std_docs.zig @@ -113,7 +113,10 @@ fn parseBuzz(process: std.process.Init, allocator: Allocator, source: []const u8 ); defer parser.deinit(); - const ast = try parser.parse(source, source_path, module_name) orelse { + const root_dir = try std.Io.Dir.cwd().realPathFileAlloc(process.io, ".", allocator); + defer allocator.free(root_dir); + + const ast = try parser.parse(source, root_dir, source_path, module_name) orelse { return error.ParseFailed; }; diff --git a/src/wasm_repl.zig b/src/wasm_repl.zig index d0025007..e9c8e769 100644 --- a/src/wasm_repl.zig +++ b/src/wasm_repl.zig @@ -92,7 +92,7 @@ pub export fn initRepl() *ReplCtx { // Import std and debug as commodity _ = runSource( - "import \"std\";import \"debug\";", + "import \"buzz:std\";import \"buzz:debug\";", "REPL", vm, codegen, @@ -217,7 +217,7 @@ fn runSource( codegen: *CodeGen, parser: *Parser, ) !?Value { - if (try parser.parse(source, null, file_name)) |ast| { + if (try parser.parse(source, &.{}, null, file_name)) |ast| { const ast_slice = ast.slice(); if (try codegen.generate(ast_slice)) |function| { try vm.interpret( diff --git a/tests/behavior/anonymous-objects.buzz b/tests/behavior/anonymous-objects.buzz index 685e32ed..7d6f4cfe 100644 --- a/tests/behavior/anonymous-objects.buzz +++ b/tests/behavior/anonymous-objects.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/behavior/any.buzz b/tests/behavior/any.buzz index e2efbc8f..42c4f624 100644 --- a/tests/behavior/any.buzz +++ b/tests/behavior/any.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/behavior/basic-types.buzz b/tests/behavior/basic-types.buzz index c7e5faa3..ee3b4652 100644 --- a/tests/behavior/basic-types.buzz +++ b/tests/behavior/basic-types.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/behavior/bitwise.buzz b/tests/behavior/bitwise.buzz index 5cee4cac..63288a54 100644 --- a/tests/behavior/bitwise.buzz +++ b/tests/behavior/bitwise.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Bitwise (constant folded)" { std\assert(15 << 3 == 120, message: "<<"); diff --git a/tests/behavior/block-expression.buzz b/tests/behavior/block-expression.buzz index 7c8ddd73..f7d2ef62 100644 --- a/tests/behavior/block-expression.buzz +++ b/tests/behavior/block-expression.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "block expression" { final value = from { diff --git a/tests/behavior/break-continue.buzz b/tests/behavior/break-continue.buzz index 51cf4f25..6320d524 100644 --- a/tests/behavior/break-continue.buzz +++ b/tests/behavior/break-continue.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "break statement" { var i = 0; diff --git a/tests/behavior/buffer.buzz b/tests/behavior/buffer.buzz index 105c553f..316cbaed 100644 --- a/tests/behavior/buffer.buzz +++ b/tests/behavior/buffer.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/behavior/c-buzz-api.buzz b/tests/behavior/c-buzz-api.buzz index 64308c17..28d23891 100644 --- a/tests/behavior/c-buzz-api.buzz +++ b/tests/behavior/c-buzz-api.buzz @@ -1,5 +1,5 @@ -import "std"; -import "tests/utils/buzz_c_api"; +import "buzz:std"; +import "../utils/buzz_c_api"; test "C buzz api library" { std\assert( diff --git a/tests/behavior/call-without-parentheses.buzz b/tests/behavior/call-without-parentheses.buzz index 07c6ff76..b9f71dfd 100644 --- a/tests/behavior/call-without-parentheses.buzz +++ b/tests/behavior/call-without-parentheses.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload { data: str, diff --git a/tests/behavior/checked-subscript.buzz b/tests/behavior/checked-subscript.buzz index 40ba1ab4..173dcaea 100644 --- a/tests/behavior/checked-subscript.buzz +++ b/tests/behavior/checked-subscript.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "List checked subscript" { final list = [ 1, 2, 3 ]; diff --git a/tests/behavior/clone-mutability-methods.buzz b/tests/behavior/clone-mutability-methods.buzz index 657cf2d6..1bd3cfb3 100644 --- a/tests/behavior/clone-mutability-methods.buzz +++ b/tests/behavior/clone-mutability-methods.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "clone methods are available for matching mutability" { final immutableList: [int] = [ 1, 2 ]; diff --git a/tests/behavior/common-namespace.buzz b/tests/behavior/common-namespace.buzz index 0c332129..81d873fd 100644 --- a/tests/behavior/common-namespace.buzz +++ b/tests/behavior/common-namespace.buzz @@ -1,8 +1,8 @@ namespace commom\part; -import "tests/utils/common-namespace"; -import "tests/utils/common-namespace-sibling"; -import "std"; +import "../utils/common-namespace"; +import "../utils/common-namespace-sibling"; +import "buzz:std"; test "Import with common part in namespace" { std\assert(here\message == "hello world"); diff --git a/tests/behavior/composite-assign.buzz b/tests/behavior/composite-assign.buzz index 63c2776b..5d66a53b 100644 --- a/tests/behavior/composite-assign.buzz +++ b/tests/behavior/composite-assign.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/behavior/control-flow.buzz b/tests/behavior/control-flow.buzz index 2ee758e3..48bd23d1 100644 --- a/tests/behavior/control-flow.buzz +++ b/tests/behavior/control-flow.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/behavior/crypto.buzz b/tests/behavior/crypto.buzz index d1752198..2b00bb11 100644 --- a/tests/behavior/crypto.buzz +++ b/tests/behavior/crypto.buzz @@ -1,5 +1,5 @@ -import "std"; -import "crypto" as _; +import "buzz:std"; +import "buzz:crypto" as _; test "hash" { std\assert( diff --git a/tests/behavior/dead-branches.buzz b/tests/behavior/dead-branches.buzz index 1bb49678..c3e04be4 100644 --- a/tests/behavior/dead-branches.buzz +++ b/tests/behavior/dead-branches.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/behavior/debug.buzz b/tests/behavior/debug.buzz index 88ac502d..8eeba8f5 100644 --- a/tests/behavior/debug.buzz +++ b/tests/behavior/debug.buzz @@ -1,4 +1,4 @@ -import "debug"; +import "buzz:debug"; enum MyEnum { One, diff --git a/tests/behavior/default-arguments.buzz b/tests/behavior/default-arguments.buzz index 9985b801..4274ebe2 100644 --- a/tests/behavior/default-arguments.buzz +++ b/tests/behavior/default-arguments.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/behavior/enums.buzz b/tests/behavior/enums.buzz index 9b5794bf..89e9f43f 100644 --- a/tests/behavior/enums.buzz +++ b/tests/behavior/enums.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/behavior/extern-library.buzz b/tests/behavior/extern-library.buzz index b613ec42..974e2b0c 100644 --- a/tests/behavior/extern-library.buzz +++ b/tests/behavior/extern-library.buzz @@ -1,4 +1,4 @@ -import "tests/utils/hello"; +import "../utils/hello"; test "Use external library" { hello\sayHello(); diff --git a/tests/behavior/ffi.buzz b/tests/behavior/ffi.buzz index 099a7549..dba1fc66 100644 --- a/tests/behavior/ffi.buzz +++ b/tests/behavior/ffi.buzz @@ -1,6 +1,6 @@ -import "std"; -import "buffer" as _; -import "ffi"; +import "buzz:std"; +import "buzz:buffer" as _; +import "buzz:ffi"; zdef( "tests/utils/libforeign", diff --git a/tests/behavior/fibers.buzz b/tests/behavior/fibers.buzz index a1593f97..4244f36b 100644 --- a/tests/behavior/fibers.buzz +++ b/tests/behavior/fibers.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded @@ -47,6 +47,29 @@ fun count(n: int) > str *> int? { return "Counting is done!"; } +/// Task used to verify that yield operands include member calls. +object FiberTask { + /// Score yielded by the fiber. + points: int, + + /// Returns the task score. + fun score() > int => this.points; +} + +/// Yields a method call result without requiring parentheses around the call. +fun yieldTaskScore(task: FiberTask) > str *> int? { + _ = yield task.score(); + + return "Scored task"; +} + +test "yield operand includes method calls" { + final fiber = &yieldTaskScore(.{ points = 8 }); + + std\assert(resume fiber == 8, message: "Yielded method call result"); + std\assert(resolve fiber == "Scored task", message: "Resolved yielding fiber"); +} + fun fail() > bool !> str { throw "This fiber failed"; diff --git a/tests/behavior/for.buzz b/tests/behavior/for.buzz index e0b95f66..1bc63e7c 100644 --- a/tests/behavior/for.buzz +++ b/tests/behavior/for.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "for loop" { var sum = 0; diff --git a/tests/behavior/foreach.buzz b/tests/behavior/foreach.buzz index 21a2c4c8..737ea121 100644 --- a/tests/behavior/foreach.buzz +++ b/tests/behavior/foreach.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/behavior/free-identifiers.buzz b/tests/behavior/free-identifiers.buzz index 2a98ac01..7925a9da 100644 --- a/tests/behavior/free-identifiers.buzz +++ b/tests/behavior/free-identifiers.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Free identifiers" { final @"non-standard-identifier" = "hello world"; diff --git a/tests/behavior/fs.buzz b/tests/behavior/fs.buzz index 274940a0..b65702ef 100644 --- a/tests/behavior/fs.buzz +++ b/tests/behavior/fs.buzz @@ -1,5 +1,5 @@ -import "std"; -import "fs"; +import "buzz:std"; +import "buzz:fs"; test "cwd" { std\assert(fs\currentDirectory() != "", message: "Could get cwd"); diff --git a/tests/behavior/functional.buzz b/tests/behavior/functional.buzz index efd1c0c3..49693cfe 100644 --- a/tests/behavior/functional.buzz +++ b/tests/behavior/functional.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/behavior/gc.buzz b/tests/behavior/gc.buzz index 01148afa..c77553d6 100644 --- a/tests/behavior/gc.buzz +++ b/tests/behavior/gc.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/behavior/generics.buzz b/tests/behavior/generics.buzz index 1a3f3c5e..36315241 100644 --- a/tests/behavior/generics.buzz +++ b/tests/behavior/generics.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/behavior/if-arrow.buzz b/tests/behavior/if-arrow.buzz index 73dc6e2e..43d67972 100644 --- a/tests/behavior/if-arrow.buzz +++ b/tests/behavior/if-arrow.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "If arrow" { final opt: int? = null; diff --git a/tests/behavior/import-export.buzz b/tests/behavior/import-export.buzz index d4e6976e..965f5576 100644 --- a/tests/behavior/import-export.buzz +++ b/tests/behavior/import-export.buzz @@ -1,4 +1,4 @@ -import "tests/utils/testing" as testing; +import "../utils/testing" as testing; final mine = 42; diff --git a/tests/behavior/import-lib.buzz b/tests/behavior/import-lib.buzz index 2b376abf..eb9ce53c 100644 --- a/tests/behavior/import-lib.buzz +++ b/tests/behavior/import-lib.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { assert(true, message: "yeah!"); diff --git a/tests/behavior/inferred-enum-case.buzz b/tests/behavior/inferred-enum-case.buzz index df43c125..9d7b6593 100644 --- a/tests/behavior/inferred-enum-case.buzz +++ b/tests/behavior/inferred-enum-case.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum Locale { fr, diff --git a/tests/behavior/inferred-var-type.buzz b/tests/behavior/inferred-var-type.buzz index d1732371..103f005f 100644 --- a/tests/behavior/inferred-var-type.buzz +++ b/tests/behavior/inferred-var-type.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Person { name: str = "Joe", diff --git a/tests/behavior/inline-catch.buzz b/tests/behavior/inline-catch.buzz index 642a2610..48882164 100644 --- a/tests/behavior/inline-catch.buzz +++ b/tests/behavior/inline-catch.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > int !> str { throw "i'm failing"; diff --git a/tests/behavior/inline-if.buzz b/tests/behavior/inline-if.buzz index 6450eb86..877e5616 100644 --- a/tests/behavior/inline-if.buzz +++ b/tests/behavior/inline-if.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "ternary" { var value = if (true) 12 else 0; diff --git a/tests/behavior/interpolation.buzz b/tests/behavior/interpolation.buzz index 7b47ede6..7e4a482a 100644 --- a/tests/behavior/interpolation.buzz +++ b/tests/behavior/interpolation.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Escape sequences" { std\print("\{escaped interpolation}, \nhello\tworld, backslash \\ \"hey\""); diff --git a/tests/behavior/invoke.buzz b/tests/behavior/invoke.buzz index b9656176..21c47806 100644 --- a/tests/behavior/invoke.buzz +++ b/tests/behavior/invoke.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object A { list: [A], diff --git a/tests/behavior/io.buzz b/tests/behavior/io.buzz index 85429a20..11c67c36 100644 --- a/tests/behavior/io.buzz +++ b/tests/behavior/io.buzz @@ -1,6 +1,6 @@ -import "std"; -import "io"; -import "fs"; +import "buzz:std"; +import "buzz:io"; +import "buzz:fs"; test "Write & read a file" { final file = io\File.open("./hello.txt", mode: .write); diff --git a/tests/behavior/is.buzz b/tests/behavior/is.buzz index e776ab75..37f33b69 100644 --- a/tests/behavior/is.buzz +++ b/tests/behavior/is.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object MyObj { id: int = 1, diff --git a/tests/behavior/iterator.buzz b/tests/behavior/iterator.buzz index 917e2104..cf1be716 100644 --- a/tests/behavior/iterator.buzz +++ b/tests/behavior/iterator.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun fibonacci(n: int) > void *> int? { var n1 = 0; diff --git a/tests/behavior/jit-dynamic-call.buzz b/tests/behavior/jit-dynamic-call.buzz index 9bff6285..71893872 100644 --- a/tests/behavior/jit-dynamic-call.buzz +++ b/tests/behavior/jit-dynamic-call.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun dynamicInc(value: int) > int { return value + 1; diff --git a/tests/behavior/jit-hotspot-string-interpolation.buzz b/tests/behavior/jit-hotspot-string-interpolation.buzz index af314f7a..d8e6df51 100644 --- a/tests/behavior/jit-hotspot-string-interpolation.buzz +++ b/tests/behavior/jit-hotspot-string-interpolation.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; /// Mouse event category used by the JIT interpolation regression. enum MouseKind { diff --git a/tests/behavior/json.buzz b/tests/behavior/json.buzz index 6efda1ba..eb4664c9 100644 --- a/tests/behavior/json.buzz +++ b/tests/behavior/json.buzz @@ -1,5 +1,5 @@ -import "std"; -import "serialize"; +import "buzz:std"; +import "buzz:serialize"; test "Json.encode" { final data = { diff --git a/tests/behavior/labels.buzz b/tests/behavior/labels.buzz index 911e776d..6a5a54e1 100644 --- a/tests/behavior/labels.buzz +++ b/tests/behavior/labels.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "labeled break" { var i = 0; diff --git a/tests/behavior/lambda.buzz b/tests/behavior/lambda.buzz index 7ed3c228..e177dd28 100644 --- a/tests/behavior/lambda.buzz +++ b/tests/behavior/lambda.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lambda/Anonymous functions" { final mul: fun (n: int) > int = fun (n: int) > int => n * 2; diff --git a/tests/behavior/list-map-properties.buzz b/tests/behavior/list-map-properties.buzz index afadb092..fe3f29d2 100644 --- a/tests/behavior/list-map-properties.buzz +++ b/tests/behavior/list-map-properties.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Hey { ages: [int], diff --git a/tests/behavior/lists.buzz b/tests/behavior/lists.buzz index b536dc10..74fca5df 100644 --- a/tests/behavior/lists.buzz +++ b/tests/behavior/lists.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/behavior/long-namespace.buzz b/tests/behavior/long-namespace.buzz index ce154379..956991a0 100644 --- a/tests/behavior/long-namespace.buzz +++ b/tests/behavior/long-namespace.buzz @@ -1,5 +1,5 @@ -import "std"; -import "tests/utils/complex-namespace"; +import "buzz:std"; +import "../utils/complex-namespace"; test "Global with multi part namespace" { std\print(rather\long\name\hello); diff --git a/tests/behavior/maps.buzz b/tests/behavior/maps.buzz index 4a4b5c8a..10173fe5 100644 --- a/tests/behavior/maps.buzz +++ b/tests/behavior/maps.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/behavior/match.buzz b/tests/behavior/match.buzz index 6757d253..660d5f47 100644 --- a/tests/behavior/match.buzz +++ b/tests/behavior/match.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object MatchBox { value: int = 1, diff --git a/tests/behavior/math.buzz b/tests/behavior/math.buzz index c3143e8d..becda408 100644 --- a/tests/behavior/math.buzz +++ b/tests/behavior/math.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/behavior/multiline-strings.buzz b/tests/behavior/multiline-strings.buzz index 4f0d1816..a226c3d6 100644 --- a/tests/behavior/multiline-strings.buzz +++ b/tests/behavior/multiline-strings.buzz @@ -1,5 +1,5 @@ -import "std"; -import "serialize"; +import "buzz:std"; +import "buzz:serialize"; test "Multiline strings" { final multi = `\{ diff --git a/tests/behavior/mutual-import.buzz b/tests/behavior/mutual-import.buzz index c4f38900..3a90b236 100644 --- a/tests/behavior/mutual-import.buzz +++ b/tests/behavior/mutual-import.buzz @@ -1,6 +1,6 @@ -import "std"; -import "tests/utils/import-b"; -import "tests/utils/import-a"; +import "buzz:std"; +import "../utils/import-b"; +import "../utils/import-a"; test "Mutual import" { std\print("t: {a\Hello}"); diff --git a/tests/behavior/named-expr.buzz b/tests/behavior/named-expr.buzz index 6979c43c..b2394555 100644 --- a/tests/behavior/named-expr.buzz +++ b/tests/behavior/named-expr.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Person { name: str, diff --git a/tests/behavior/namespace.buzz b/tests/behavior/namespace.buzz index 5644c8bb..3aafee7c 100644 --- a/tests/behavior/namespace.buzz +++ b/tests/behavior/namespace.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math"; +import "buzz:std"; +import "buzz:math"; test "Global is resolved with correct namespace" { std\print("hello world"); diff --git a/tests/behavior/nullable-default.buzz b/tests/behavior/nullable-default.buzz index c69790f3..25dc6b78 100644 --- a/tests/behavior/nullable-default.buzz +++ b/tests/behavior/nullable-default.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Person { name: str, diff --git a/tests/behavior/object-generics.buzz b/tests/behavior/object-generics.buzz index ae698951..1780894c 100644 --- a/tests/behavior/object-generics.buzz +++ b/tests/behavior/object-generics.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/behavior/objects.buzz b/tests/behavior/objects.buzz index 2ef56798..dc8df491 100644 --- a/tests/behavior/objects.buzz +++ b/tests/behavior/objects.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object First { name: str = "Joe", diff --git a/tests/behavior/operators.buzz b/tests/behavior/operators.buzz index 4117002d..1b24eeb3 100644 --- a/tests/behavior/operators.buzz +++ b/tests/behavior/operators.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Binary operators" { std\assert(12 == 12, message: "equality (number)"); diff --git a/tests/behavior/optionals.buzz b/tests/behavior/optionals.buzz index aee0ab77..384b28bd 100644 --- a/tests/behavior/optionals.buzz +++ b/tests/behavior/optionals.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Optional force unwrapping with `!`" { // Note: trying to force unwrap a null value raises an uncatchable error diff --git a/tests/behavior/os.buzz b/tests/behavior/os.buzz index 1b9c142b..5a209c04 100644 --- a/tests/behavior/os.buzz +++ b/tests/behavior/os.buzz @@ -1,5 +1,5 @@ -import "std"; -import "os" as os; +import "buzz:std"; +import "buzz:os" as os; test "env" { std\assert( diff --git a/tests/behavior/pattern.buzz b/tests/behavior/pattern.buzz index 8a36177f..5cca0b72 100644 --- a/tests/behavior/pattern.buzz +++ b/tests/behavior/pattern.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.matchAgainst" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/behavior/placeholder-cycle.buzz b/tests/behavior/placeholder-cycle.buzz index 1b50e19e..a42deae0 100644 --- a/tests/behavior/placeholder-cycle.buzz +++ b/tests/behavior/placeholder-cycle.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object A { b: B, diff --git a/tests/behavior/protocols.buzz b/tests/behavior/protocols.buzz index 2dededfe..8d075de2 100644 --- a/tests/behavior/protocols.buzz +++ b/tests/behavior/protocols.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/behavior/range-expression-scope.buzz b/tests/behavior/range-expression-scope.buzz index dfeb42aa..cfab25ad 100644 --- a/tests/behavior/range-expression-scope.buzz +++ b/tests/behavior/range-expression-scope.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun check(peeked: int) > bool { final local = peeked; diff --git a/tests/behavior/range.buzz b/tests/behavior/range.buzz index a00fb030..7fe5c0a4 100644 --- a/tests/behavior/range.buzz +++ b/tests/behavior/range.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/behavior/run-file.buzz b/tests/behavior/run-file.buzz index 6fc28779..b6cfe5e7 100644 --- a/tests/behavior/run-file.buzz +++ b/tests/behavior/run-file.buzz @@ -1,5 +1,5 @@ -import "std"; -import "io"; +import "buzz:std"; +import "buzz:io"; test "runFile" { io\runFile("tests/utils/testing.buzz"); diff --git a/tests/behavior/scope.buzz b/tests/behavior/scope.buzz index 20652841..8750ddcb 100644 --- a/tests/behavior/scope.buzz +++ b/tests/behavior/scope.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "locals inside a foreach" { final hello = ""; diff --git a/tests/behavior/std.buzz b/tests/behavior/std.buzz index 2075bba1..edc8ea19 100644 --- a/tests/behavior/std.buzz +++ b/tests/behavior/std.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "std\parseInt/Double" { std\assert(std\parseInt("12") == 12, message: "Could parse int"); diff --git a/tests/behavior/str.buzz b/tests/behavior/str.buzz index b6549e70..8618d4c6 100644 --- a/tests/behavior/str.buzz +++ b/tests/behavior/str.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/behavior/tail-call.buzz b/tests/behavior/tail-call.buzz index b856d9be..7987f50d 100644 --- a/tests/behavior/tail-call.buzz +++ b/tests/behavior/tail-call.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun mul(a: int, b: int) > int { return a * b; diff --git a/tests/behavior/testing.buzz b/tests/behavior/testing.buzz index 376dc38f..6fe28aa7 100644 --- a/tests/behavior/testing.buzz +++ b/tests/behavior/testing.buzz @@ -1,4 +1,4 @@ -import "testing" as _; +import "buzz:test" as _; test "Test std lib" { final t = Tester.init( diff --git a/tests/behavior/throw-inside-try.buzz b/tests/behavior/throw-inside-try.buzz index 4fe54731..9d25ee44 100644 --- a/tests/behavior/throw-inside-try.buzz +++ b/tests/behavior/throw-inside-try.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { if (false) { diff --git a/tests/behavior/toml.buzz b/tests/behavior/toml.buzz index babc10b7..f920131c 100644 --- a/tests/behavior/toml.buzz +++ b/tests/behavior/toml.buzz @@ -1,6 +1,6 @@ -import "toml"; -import "std"; -import "serialize" as _; +import "buzz:toml"; +import "buzz:std"; +import "buzz:serialize" as _; fun assertInvalidToml(source: str, message: str) > void { var invalid = false; diff --git a/tests/behavior/try-catch.buzz b/tests/behavior/try-catch.buzz index fe6b3fe6..725b7d3a 100644 --- a/tests/behavior/try-catch.buzz +++ b/tests/behavior/try-catch.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/behavior/tuples.buzz b/tests/behavior/tuples.buzz index 2513f3ac..bc4597fe 100644 --- a/tests/behavior/tuples.buzz +++ b/tests/behavior/tuples.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str, :str, :str } { return .{ diff --git a/tests/behavior/types-as-value.buzz b/tests/behavior/types-as-value.buzz index 28f9afc8..bfcbf14b 100644 --- a/tests/behavior/types-as-value.buzz +++ b/tests/behavior/types-as-value.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/behavior/upvalues.buzz b/tests/behavior/upvalues.buzz index 04b480ee..aed8bcaf 100644 --- a/tests/behavior/upvalues.buzz +++ b/tests/behavior/upvalues.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun upvals() > fun () { final upvalue = 12; diff --git a/tests/behavior/utf8.buzz b/tests/behavior/utf8.buzz index d67ec91c..640c1cfa 100644 --- a/tests/behavior/utf8.buzz +++ b/tests/behavior/utf8.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/bench/ackermann.buzz b/tests/bench/ackermann.buzz index 6b3d941a..fa4d30a1 100644 --- a/tests/bench/ackermann.buzz +++ b/tests/bench/ackermann.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main(args: [str]) > void { final m = std\parseInt(args[?0] ?? "3") ?? 3; diff --git a/tests/bench/btree.buzz b/tests/bench/btree.buzz index 982076c1..8bb8ae01 100644 --- a/tests/bench/btree.buzz +++ b/tests/bench/btree.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math"; +import "buzz:std"; +import "buzz:math"; object Node { left: Node?, diff --git a/tests/bench/bubble-sort.buzz b/tests/bench/bubble-sort.buzz index 14431240..0d37dbe4 100644 --- a/tests/bench/bubble-sort.buzz +++ b/tests/bench/bubble-sort.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main(args: [str]) > void { final max = std\parseInt(args[?0] ?? "750") ?? 750; diff --git a/tests/bench/fasta.buzz b/tests/bench/fasta.buzz index 8ad336c2..4f588855 100644 --- a/tests/bench/fasta.buzz +++ b/tests/bench/fasta.buzz @@ -1,6 +1,6 @@ -import "std"; -import "math"; -import "buffer" as _; +import "buzz:std"; +import "buzz:math"; +import "buzz:buffer" as _; final IM = 139968.0; final IA = 3877.0; diff --git a/tests/bench/fib.buzz b/tests/bench/fib.buzz index c6c4973c..de1470c5 100644 --- a/tests/bench/fib.buzz +++ b/tests/bench/fib.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun fibonnacci(n: int) > int { if (n < 2) { diff --git a/tests/bench/for.buzz b/tests/bench/for.buzz index b127e657..c4f6725d 100644 --- a/tests/bench/for.buzz +++ b/tests/bench/for.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void { final list: mut [int] = mut []; diff --git a/tests/bench/grid.buzz b/tests/bench/grid.buzz index 920314c3..765bbdfb 100644 --- a/tests/bench/grid.buzz +++ b/tests/bench/grid.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main(args: [str]) > void { final width = std\parseInt(args[?0] ?? "80") ?? 80; diff --git a/tests/bench/k-nucleoide.buzz b/tests/bench/k-nucleoide.buzz index ff3953d7..d4b7820f 100644 --- a/tests/bench/k-nucleoide.buzz +++ b/tests/bench/k-nucleoide.buzz @@ -1,6 +1,6 @@ -import "std"; -import "io"; -import "errors"; +import "buzz:std"; +import "buzz:io"; +import "buzz:errors"; fun readSequence() > str !> errors\ReadWriteError, errors\FileSystemError, errors\UnexpectedError { diff --git a/tests/bench/merkle.buzz b/tests/bench/merkle.buzz index ddcebb26..743dc33a 100644 --- a/tests/bench/merkle.buzz +++ b/tests/bench/merkle.buzz @@ -1,6 +1,6 @@ -import "std"; -import "math"; -import "errors"; +import "buzz:std"; +import "buzz:math"; +import "buzz:errors"; object Node { left: mut Node?, diff --git a/tests/bench/nbody.buzz b/tests/bench/nbody.buzz index 37fce2ca..80be57f7 100644 --- a/tests/bench/nbody.buzz +++ b/tests/bench/nbody.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math"; +import "buzz:std"; +import "buzz:math"; final pi = 3.141592653589793; final solarMass = 4.0 * pi * pi; diff --git a/tests/bench/spectral.buzz b/tests/bench/spectral.buzz index 5f4d891e..2603e315 100644 --- a/tests/bench/spectral.buzz +++ b/tests/bench/spectral.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math"; +import "buzz:std"; +import "buzz:math"; fun A(i: double, j: double) > double { final ij = i + j; diff --git a/tests/compile_errors/arrow-return-match-optional.buzz b/tests/compile_errors/arrow-return-match-optional.buzz new file mode 100644 index 00000000..d09ca04e --- /dev/null +++ b/tests/compile_errors/arrow-return-match-optional.buzz @@ -0,0 +1,12 @@ +// Return value: got type `int?`, expected `int` +namespace return_type; + +/// Returns an optional branch through a declared non-optional function. +fun score(points: int?) > int => match (true) { + true -> points, + false -> 0, +}; + +test "arrow return match optional" { + _ = score(1); +} diff --git a/tests/compile_errors/bad-pattern.buzz b/tests/compile_errors/bad-pattern.buzz index d999a648..e1fb5cd7 100644 --- a/tests/compile_errors/bad-pattern.buzz +++ b/tests/compile_errors/bad-pattern.buzz @@ -1,5 +1,5 @@ // Could not compile pattern -import "std"; +import "buzz:std"; test "bad pattern" { final bad = $"bad\pattern"; diff --git a/tests/compile_errors/const.buzz b/tests/compile_errors/const.buzz index 9a98da25..d6c021bb 100644 --- a/tests/compile_errors/const.buzz +++ b/tests/compile_errors/const.buzz @@ -1,5 +1,5 @@ // Can't assign to final variable -import "std"; +import "buzz:std"; test "`final` variable" { final yo = "yo"; diff --git a/tests/compile_errors/deep-yield.buzz b/tests/compile_errors/deep-yield.buzz index ea7c9b47..fd69dcc7 100644 --- a/tests/compile_errors/deep-yield.buzz +++ b/tests/compile_errors/deep-yield.buzz @@ -1,5 +1,5 @@ // Type mismatch: got type `str`, expected `void` -import "std"; +import "buzz:std"; fun one() > void *> str? { _ = yield "hello"; diff --git a/tests/compile_errors/duplicated-namespace.buzz b/tests/compile_errors/duplicated-namespace.buzz index 3cff08c3..82865b43 100644 --- a/tests/compile_errors/duplicated-namespace.buzz +++ b/tests/compile_errors/duplicated-namespace.buzz @@ -1,6 +1,6 @@ // The namespace `duplicated\` already exists -import "tests/utils/duplicate-namespace-1"; -import "tests/utils/duplicate-namespace-2"; +import "../utils/duplicate-namespace-1"; +import "../utils/duplicate-namespace-2"; test "Should not be able to import two scripts with the same neamespace" { } diff --git a/tests/compile_errors/duplicated-own-namespace.buzz b/tests/compile_errors/duplicated-own-namespace.buzz index d04d8781..b5be61ce 100644 --- a/tests/compile_errors/duplicated-own-namespace.buzz +++ b/tests/compile_errors/duplicated-own-namespace.buzz @@ -1,6 +1,6 @@ // The namespace `duplicated\` already exists namespace duplicated; -import "tests/utils/duplicate-namespace-1"; +import "../utils/duplicate-namespace-1"; test "Should not be able to import sames namespace as current one" {} diff --git a/tests/compile_errors/early-return.buzz b/tests/compile_errors/early-return.buzz index 9b1502d5..e070358e 100644 --- a/tests/compile_errors/early-return.buzz +++ b/tests/compile_errors/early-return.buzz @@ -1,5 +1,5 @@ // Code after return statement will never be reached -import "std"; +import "buzz:std"; test "Early return" { std\print("I sure hope i'm not interrupted..."); diff --git a/tests/compile_errors/fiber-error-location.buzz b/tests/compile_errors/fiber-error-location.buzz index 723faf9b..c41e02d1 100644 --- a/tests/compile_errors/fiber-error-location.buzz +++ b/tests/compile_errors/fiber-error-location.buzz @@ -1,5 +1,5 @@ //:7:37 -import "std"; +import "buzz:std"; fun count(n: int) > str *> int? { for (i: int = 0; i < n; i = i + 1) { diff --git a/tests/compile_errors/import-syntax-error.buzz b/tests/compile_errors/import-syntax-error.buzz index 14f60774..d547d0e5 100644 --- a/tests/compile_errors/import-syntax-error.buzz +++ b/tests/compile_errors/import-syntax-error.buzz @@ -1,4 +1,4 @@ // Type mismatch: got type `str`, expected `int` -import "tests/compile_errors/utils/import-syntax-error"; +import "utils/import-syntax-error"; test "imported syntax errors are reported" {} diff --git a/tests/compile_errors/match-else-missing-arrow.buzz b/tests/compile_errors/match-else-missing-arrow.buzz index 97330e51..9960933c 100644 --- a/tests/compile_errors/match-else-missing-arrow.buzz +++ b/tests/compile_errors/match-else-missing-arrow.buzz @@ -1,5 +1,5 @@ // Expected `->` after `else` -import "std"; +import "buzz:std"; test "match else missing arrow" { std\assert( diff --git a/tests/compile_errors/match-number-condition-type.buzz b/tests/compile_errors/match-number-condition-type.buzz index 3ee1af02..d0474d7d 100644 --- a/tests/compile_errors/match-number-condition-type.buzz +++ b/tests/compile_errors/match-number-condition-type.buzz @@ -1,5 +1,5 @@ // `match` condition must be of type `int`, `double`, `rg` or `type` -import "std"; +import "buzz:std"; test "match number condition type" { std\assert( diff --git a/tests/compile_errors/match-string-condition-type.buzz b/tests/compile_errors/match-string-condition-type.buzz index a4792f95..fbc2808b 100644 --- a/tests/compile_errors/match-string-condition-type.buzz +++ b/tests/compile_errors/match-string-condition-type.buzz @@ -1,5 +1,5 @@ // `match` condition must be of type `str`, `pat` or `type` -import "std"; +import "buzz:std"; test "match string condition type" { std\assert( diff --git a/tests/compile_errors/match-value-condition-type.buzz b/tests/compile_errors/match-value-condition-type.buzz index 3baa2fb9..093abb11 100644 --- a/tests/compile_errors/match-value-condition-type.buzz +++ b/tests/compile_errors/match-value-condition-type.buzz @@ -1,5 +1,5 @@ // Bad `match` condition type -import "std"; +import "buzz:std"; test "match value condition type" { std\assert( diff --git a/tests/compile_errors/multiple-location.buzz b/tests/compile_errors/multiple-location.buzz index 6e48755c..643eb1d8 100644 --- a/tests/compile_errors/multiple-location.buzz +++ b/tests/compile_errors/multiple-location.buzz @@ -1,5 +1,5 @@ // Property `name` does not exists -import "errors"; +import "buzz:errors"; object Some { msg: str, diff --git a/tests/compile_errors/selective-import.buzz b/tests/compile_errors/selective-import.buzz index 8096fbc1..9f125f32 100644 --- a/tests/compile_errors/selective-import.buzz +++ b/tests/compile_errors/selective-import.buzz @@ -1,5 +1,5 @@ // `assert` is not defined -import print from "std"; +import print from "buzz:std"; test "Should not be able to use anything else from std" { assert(false); diff --git a/tests/compile_errors/unused-import.buzz b/tests/compile_errors/unused-import.buzz index 6570239d..46414358 100644 --- a/tests/compile_errors/unused-import.buzz +++ b/tests/compile_errors/unused-import.buzz @@ -1,6 +1,6 @@ // Unused import -import "math"; -import "std"; +import "buzz:math"; +import "buzz:std"; test "Doing nothing with the math import" { std\print("hello"); diff --git a/tests/compile_errors/unused-local.buzz b/tests/compile_errors/unused-local.buzz index c15f6f83..fa9ba6c1 100644 --- a/tests/compile_errors/unused-local.buzz +++ b/tests/compile_errors/unused-local.buzz @@ -1,5 +1,5 @@ // Unused local of type `int` -import "std"; +import "buzz:std"; fun hey(unused: int) > void { print("hey you missed me"); diff --git a/tests/fuzzed/id_000000,src_000013,time_863917,execs_18330,op_quick,pos_104,val_+1.buzz b/tests/fuzzed/id_000000,src_000013,time_863917,execs_18330,op_quick,pos_104,val_+1.buzz index 6ebff1da..10760b58 100644 --- a/tests/fuzzed/id_000000,src_000013,time_863917,execs_18330,op_quick,pos_104,val_+1.buzz +++ b/tests/fuzzed/id_000000,src_000013,time_863917,execs_18330,op_quick,pos_104,val_+1.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, mnssage: "yeah!"); diff --git a/tests/fuzzed/id_000001,src_000013,time_932808,execs_18686,op_flip1,pos_105.buzz b/tests/fuzzed/id_000001,src_000013,time_932808,execs_18686,op_flip1,pos_105.buzz index f9ed1a76..b58f3d9e 100644 --- a/tests/fuzzed/id_000001,src_000013,time_932808,execs_18686,op_flip1,pos_105.buzz +++ b/tests/fuzzed/id_000001,src_000013,time_932808,execs_18686,op_flip1,pos_105.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, me3sage: "yeah!"); diff --git a/tests/fuzzed/id_000002,src_000013,time_934683,execs_18688,op_flip1,pos_105.buzz b/tests/fuzzed/id_000002,src_000013,time_934683,execs_18688,op_flip1,pos_105.buzz index 073b6539..d0f3bbc0 100644 --- a/tests/fuzzed/id_000002,src_000013,time_934683,execs_18688,op_flip1,pos_105.buzz +++ b/tests/fuzzed/id_000002,src_000013,time_934683,execs_18688,op_flip1,pos_105.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, meSsage: "yeah!"); diff --git a/tests/fuzzed/id_000003,src_000013,time_944955,execs_18702,op_flip1,pos_108.buzz b/tests/fuzzed/id_000003,src_000013,time_944955,execs_18702,op_flip1,pos_108.buzz index faf85b54..d4eb3943 100644 --- a/tests/fuzzed/id_000003,src_000013,time_944955,execs_18702,op_flip1,pos_108.buzz +++ b/tests/fuzzed/id_000003,src_000013,time_944955,execs_18702,op_flip1,pos_108.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, messafe: "yeah!"); diff --git a/tests/fuzzed/id_000004,src_000013,time_982430,execs_18918,op_flip2,pos_105.buzz b/tests/fuzzed/id_000004,src_000013,time_982430,execs_18918,op_flip2,pos_105.buzz index 222d968b..9746a7bf 100644 --- a/tests/fuzzed/id_000004,src_000013,time_982430,execs_18918,op_flip2,pos_105.buzz +++ b/tests/fuzzed/id_000004,src_000013,time_982430,execs_18918,op_flip2,pos_105.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, meCsage: "yeah!"); diff --git a/tests/fuzzed/id_000005,src_000013,time_1726632,execs_23371,op_havoc,rep_4.buzz b/tests/fuzzed/id_000005,src_000013,time_1726632,execs_23371,op_havoc,rep_4.buzz index 713f1224..99daa1f9 100644 --- a/tests/fuzzed/id_000005,src_000013,time_1726632,execs_23371,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000005,src_000013,time_1726632,execs_23371,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Usigg a fuction coming from a library" { std\assert(true, messagf: "yeah!"); diff --git a/tests/fuzzed/id_000006,src_000013,time_1755372,execs_23546,op_havoc,rep_2.buzz b/tests/fuzzed/id_000006,src_000013,time_1755372,execs_23546,op_havoc,rep_2.buzz index 69d2dadf..8ac9a351 100644 --- a/tests/fuzzed/id_000006,src_000013,time_1755372,execs_23546,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000006,src_000013,time_1755372,execs_23546,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, mesPage: "yeah!"); diff --git a/tests/fuzzed/id_000007,src_000013,time_1831679,execs_24074,op_havoc,rep_4.buzz b/tests/fuzzed/id_000007,src_000013,time_1831679,execs_24074,op_havoc,rep_4.buzz index 7ea33e14..a6e6fa21 100644 --- a/tests/fuzzed/id_000007,src_000013,time_1831679,execs_24074,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000007,src_000013,time_1831679,execs_24074,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function ccccccccccccomiLgrom a library" { std\assert(true, iessage: "yeah!"); diff --git a/tests/fuzzed/id_000008,src_000013,time_1878199,execs_24397,op_havoc,rep_1.buzz b/tests/fuzzed/id_000008,src_000013,time_1878199,execs_24397,op_havoc,rep_1.buzz index d9f32633..5bcffcbb 100644 --- a/tests/fuzzed/id_000008,src_000013,time_1878199,execs_24397,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000008,src_000013,time_1878199,execs_24397,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, messssssssssssssssssssssssssssssssage: "yeah!"); diff --git a/tests/fuzzed/id_000009,src_000013,time_1937548,execs_24820,op_havoc,rep_2.buzz b/tests/fuzzed/id_000009,src_000013,time_1937548,execs_24820,op_havoc,rep_2.buzz index 86b71772..d089433f 100644 --- a/tests/fuzzed/id_000009,src_000013,time_1937548,execs_24820,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000009,src_000013,time_1937548,execs_24820,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a7library" { std\assert(true, Yessage: "yeah!"); diff --git a/tests/fuzzed/id_000010,src_000013,time_2225913,execs_26757,op_havoc,rep_4.buzz b/tests/fuzzed/id_000010,src_000013,time_2225913,execs_26757,op_havoc,rep_4.buzz index f78e63b6..547d12af 100644 --- a/tests/fuzzed/id_000010,src_000013,time_2225913,execs_26757,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000010,src_000013,time_2225913,execs_26757,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming Xrom a library" { std\assert(true, metsage: "yea!"); diff --git a/tests/fuzzed/id_000011,src_000013,time_2297408,execs_27208,op_havoc,rep_1.buzz b/tests/fuzzed/id_000011,src_000013,time_2297408,execs_27208,op_havoc,rep_1.buzz index e7a21121..ed34e5a3 100644 --- a/tests/fuzzed/id_000011,src_000013,time_2297408,execs_27208,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000011,src_000013,time_2297408,execs_27208,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, messsssssssssssssssssssssssssssage: "yeah!"); diff --git a/tests/fuzzed/id_000012,src_000008,time_2817091,execs_29065,op_quick,pos_488,val_+1.buzz b/tests/fuzzed/id_000012,src_000008,time_2817091,execs_29065,op_quick,pos_488,val_+1.buzz index 2d673ecb..278ad1b2 100644 --- a/tests/fuzzed/id_000012,src_000008,time_2817091,execs_29065,op_quick,pos_488,val_+1.buzz +++ b/tests/fuzzed/id_000012,src_000008,time_2817091,execs_29065,op_quick,pos_488,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000013,src_000008,time_2819714,execs_29070,op_quick,pos_492,val_+1.buzz b/tests/fuzzed/id_000013,src_000008,time_2819714,execs_29070,op_quick,pos_492,val_+1.buzz index 31850f87..b0dd2092 100644 --- a/tests/fuzzed/id_000013,src_000008,time_2819714,execs_29070,op_quick,pos_492,val_+1.buzz +++ b/tests/fuzzed/id_000013,src_000008,time_2819714,execs_29070,op_quick,pos_492,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000018,src_000008,time_3677561,execs_32267,op_havoc,rep_2.buzz b/tests/fuzzed/id_000018,src_000008,time_3677561,execs_32267,op_havoc,rep_2.buzz index 63a5f7d5..3eb0df13 100644 --- a/tests/fuzzed/id_000018,src_000008,time_3677561,execs_32267,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000018,src_000008,time_3677561,execs_32267,op_havoc,rep_2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000020,src_000727,time_5187468,execs_38213,op_quick,pos_492,val_+6.buzz b/tests/fuzzed/id_000020,src_000727,time_5187468,execs_38213,op_quick,pos_492,val_+6.buzz index 62d5ef8f..9709eaec 100644 --- a/tests/fuzzed/id_000020,src_000727,time_5187468,execs_38213,op_quick,pos_492,val_+6.buzz +++ b/tests/fuzzed/id_000020,src_000727,time_5187468,execs_38213,op_quick,pos_492,val_+6.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000021,src_000055,time_5539582,execs_39686,op_quick,pos_251,val_+1.buzz b/tests/fuzzed/id_000021,src_000055,time_5539582,execs_39686,op_quick,pos_251,val_+1.buzz index 7dfd6bba..1967e856 100644 --- a/tests/fuzzed/id_000021,src_000055,time_5539582,execs_39686,op_quick,pos_251,val_+1.buzz +++ b/tests/fuzzed/id_000021,src_000055,time_5539582,execs_39686,op_quick,pos_251,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000022,src_000055,time_5562885,execs_39790,op_quick,pos_330,val_+1.buzz b/tests/fuzzed/id_000022,src_000055,time_5562885,execs_39790,op_quick,pos_330,val_+1.buzz index 94f311e7..0392611c 100644 --- a/tests/fuzzed/id_000022,src_000055,time_5562885,execs_39790,op_quick,pos_330,val_+1.buzz +++ b/tests/fuzzed/id_000022,src_000055,time_5562885,execs_39790,op_quick,pos_330,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000023,src_000055,time_5564772,execs_39792,op_quick,pos_331,val_+1.buzz b/tests/fuzzed/id_000023,src_000055,time_5564772,execs_39792,op_quick,pos_331,val_+1.buzz index 379c75f9..34215a56 100644 --- a/tests/fuzzed/id_000023,src_000055,time_5564772,execs_39792,op_quick,pos_331,val_+1.buzz +++ b/tests/fuzzed/id_000023,src_000055,time_5564772,execs_39792,op_quick,pos_331,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000024,src_000055,time_6940331,execs_46733,op_havoc,rep_1.buzz b/tests/fuzzed/id_000024,src_000055,time_6940331,execs_46733,op_havoc,rep_1.buzz index 8fe2887b..bf0f879f 100644 --- a/tests/fuzzed/id_000024,src_000055,time_6940331,execs_46733,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000024,src_000055,time_6940331,execs_46733,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000025,src_000025,time_8384774,execs_58114,op_quick,pos_79,val_+2.buzz b/tests/fuzzed/id_000025,src_000025,time_8384774,execs_58114,op_quick,pos_79,val_+2.buzz index 5a412bdb..0172d037 100644 --- a/tests/fuzzed/id_000025,src_000025,time_8384774,execs_58114,op_quick,pos_79,val_+2.buzz +++ b/tests/fuzzed/id_000025,src_000025,time_8384774,execs_58114,op_quick,pos_79,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", mTssage: "str subscript"); diff --git a/tests/fuzzed/id_000026,src_000025,time_8439302,execs_58339,op_quick,pos_255,val_+2.buzz b/tests/fuzzed/id_000026,src_000025,time_8439302,execs_58339,op_quick,pos_255,val_+2.buzz index de0c6b1c..ecc7cf78 100644 --- a/tests/fuzzed/id_000026,src_000025,time_8439302,execs_58339,op_quick,pos_255,val_+2.buzz +++ b/tests/fuzzed/id_000026,src_000025,time_8439302,execs_58339,op_quick,pos_255,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000027,src_000025,time_8492973,execs_58552,op_quick,pos_431,val_+2.buzz b/tests/fuzzed/id_000027,src_000025,time_8492973,execs_58552,op_quick,pos_431,val_+2.buzz index a1d3b36c..c6d96a81 100644 --- a/tests/fuzzed/id_000027,src_000025,time_8492973,execs_58552,op_quick,pos_431,val_+2.buzz +++ b/tests/fuzzed/id_000027,src_000025,time_8492973,execs_58552,op_quick,pos_431,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000028,src_000025,time_8557626,execs_58806,op_quick,pos_612,val_+2.buzz b/tests/fuzzed/id_000028,src_000025,time_8557626,execs_58806,op_quick,pos_612,val_+2.buzz index a636f7b0..bae902ac 100644 --- a/tests/fuzzed/id_000028,src_000025,time_8557626,execs_58806,op_quick,pos_612,val_+2.buzz +++ b/tests/fuzzed/id_000028,src_000025,time_8557626,execs_58806,op_quick,pos_612,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000029,src_000025,time_8611425,execs_59012,op_quick,pos_781,val_+2.buzz b/tests/fuzzed/id_000029,src_000025,time_8611425,execs_59012,op_quick,pos_781,val_+2.buzz index 51f107dd..14b34d73 100644 --- a/tests/fuzzed/id_000029,src_000025,time_8611425,execs_59012,op_quick,pos_781,val_+2.buzz +++ b/tests/fuzzed/id_000029,src_000025,time_8611425,execs_59012,op_quick,pos_781,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000030,src_000025,time_8842115,execs_59845,op_quick,pos_1313,val_+2.buzz b/tests/fuzzed/id_000030,src_000025,time_8842115,execs_59845,op_quick,pos_1313,val_+2.buzz index d546dfbc..d4339303 100644 --- a/tests/fuzzed/id_000030,src_000025,time_8842115,execs_59845,op_quick,pos_1313,val_+2.buzz +++ b/tests/fuzzed/id_000030,src_000025,time_8842115,execs_59845,op_quick,pos_1313,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000031,src_000025,time_9590514,execs_62692,op_havoc,rep_3.buzz b/tests/fuzzed/id_000031,src_000025,time_9590514,execs_62692,op_havoc,rep_3.buzz index 9923cdd7..652a7996 100644 --- a/tests/fuzzed/id_000031,src_000025,time_9590514,execs_62692,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000031,src_000025,time_9590514,execs_62692,op_havoc,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000032,src_000025,time_9938774,execs_64109,op_havoc,rep_3.buzz b/tests/fuzzed/id_000032,src_000025,time_9938774,execs_64109,op_havoc,rep_3.buzz index 01b5ba25..089118a8 100644 --- a/tests/fuzzed/id_000032,src_000025,time_9938774,execs_64109,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000032,src_000025,time_9938774,execs_64109,op_havoc,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", mvssage: "str subscript"); diff --git a/tests/fuzzed/id_000033,src_000025,time_10025436,execs_64464,op_havoc,rep_1.buzz b/tests/fuzzed/id_000033,src_000025,time_10025436,execs_64464,op_havoc,rep_1.buzz index 27cf5577..f917a667 100644 --- a/tests/fuzzed/id_000033,src_000025,time_10025436,execs_64464,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000033,src_000025,time_10025436,execs_64464,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", messawe: "str subscript"); diff --git a/tests/fuzzed/id_000034,src_000042,time_13064132,execs_70410,op_quick,pos_868.buzz b/tests/fuzzed/id_000034,src_000042,time_13064132,execs_70410,op_quick,pos_868.buzz index 651a94ce..d61efd48 100644 --- a/tests/fuzzed/id_000034,src_000042,time_13064132,execs_70410,op_quick,pos_868.buzz +++ b/tests/fuzzed/id_000034,src_000042,time_13064132,execs_70410,op_quick,pos_868.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000035,src_000042,time_13199030,execs_70941,op_quick,pos_1182.buzz b/tests/fuzzed/id_000035,src_000042,time_13199030,execs_70941,op_quick,pos_1182.buzz index 9671cc80..c9d82391 100644 --- a/tests/fuzzed/id_000035,src_000042,time_13199030,execs_70941,op_quick,pos_1182.buzz +++ b/tests/fuzzed/id_000035,src_000042,time_13199030,execs_70941,op_quick,pos_1182.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000036,src_000042,time_13268403,execs_71209,op_quick,pos_1413.buzz b/tests/fuzzed/id_000036,src_000042,time_13268403,execs_71209,op_quick,pos_1413.buzz index 21931ef2..9575e66d 100644 --- a/tests/fuzzed/id_000036,src_000042,time_13268403,execs_71209,op_quick,pos_1413.buzz +++ b/tests/fuzzed/id_000036,src_000042,time_13268403,execs_71209,op_quick,pos_1413.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000037,src_000042,time_13686254,execs_72978,op_havoc,rep_1.buzz b/tests/fuzzed/id_000037,src_000042,time_13686254,execs_72978,op_havoc,rep_1.buzz index 005b7659..1b095728 100644 --- a/tests/fuzzed/id_000037,src_000042,time_13686254,execs_72978,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000037,src_000042,time_13686254,execs_72978,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000038,src_000042,time_14303774,execs_75567,op_havoc,rep_2.buzz b/tests/fuzzed/id_000038,src_000042,time_14303774,execs_75567,op_havoc,rep_2.buzz index 1d1ddc78..4ae0e016 100644 --- a/tests/fuzzed/id_000038,src_000042,time_14303774,execs_75567,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000038,src_000042,time_14303774,execs_75567,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000039,src_000041,time_17190307,execs_87650,op_quick,pos_152,val_+1.buzz b/tests/fuzzed/id_000039,src_000041,time_17190307,execs_87650,op_quick,pos_152,val_+1.buzz index 8e223fa5..26d8294f 100644 --- a/tests/fuzzed/id_000039,src_000041,time_17190307,execs_87650,op_quick,pos_152,val_+1.buzz +++ b/tests/fuzzed/id_000039,src_000041,time_17190307,execs_87650,op_quick,pos_152,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000040,src_000041,time_17293232,execs_88058,op_quick,pos_391,val_+1.buzz b/tests/fuzzed/id_000040,src_000041,time_17293232,execs_88058,op_quick,pos_391,val_+1.buzz index 2cc863af..1b8d0185 100644 --- a/tests/fuzzed/id_000040,src_000041,time_17293232,execs_88058,op_quick,pos_391,val_+1.buzz +++ b/tests/fuzzed/id_000040,src_000041,time_17293232,execs_88058,op_quick,pos_391,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000041,src_000041,time_17392405,execs_88430,op_quick,pos_678,val_+1.buzz b/tests/fuzzed/id_000041,src_000041,time_17392405,execs_88430,op_quick,pos_678,val_+1.buzz index 2823f441..a8e05127 100644 --- a/tests/fuzzed/id_000041,src_000041,time_17392405,execs_88430,op_quick,pos_678,val_+1.buzz +++ b/tests/fuzzed/id_000041,src_000041,time_17392405,execs_88430,op_quick,pos_678,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000042,src_000003,time_18612333,execs_93274,op_quick,pos_96.buzz b/tests/fuzzed/id_000042,src_000003,time_18612333,execs_93274,op_quick,pos_96.buzz index 25c28bcf..9945a194 100644 --- a/tests/fuzzed/id_000042,src_000003,time_18612333,execs_93274,op_quick,pos_96.buzz +++ b/tests/fuzzed/id_000042,src_000003,time_18612333,execs_93274,op_quick,pos_96.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000043,src_000003,time_18759009,execs_93868,op_quick,pos_617.buzz b/tests/fuzzed/id_000043,src_000003,time_18759009,execs_93868,op_quick,pos_617.buzz index b5b1b9b0..ee51598d 100644 --- a/tests/fuzzed/id_000043,src_000003,time_18759009,execs_93868,op_quick,pos_617.buzz +++ b/tests/fuzzed/id_000043,src_000003,time_18759009,execs_93868,op_quick,pos_617.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000044,src_000003,time_19033188,execs_94894,op_quick,pos_1522.buzz b/tests/fuzzed/id_000044,src_000003,time_19033188,execs_94894,op_quick,pos_1522.buzz index b192083f..386631c3 100644 --- a/tests/fuzzed/id_000044,src_000003,time_19033188,execs_94894,op_quick,pos_1522.buzz +++ b/tests/fuzzed/id_000044,src_000003,time_19033188,execs_94894,op_quick,pos_1522.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000045,src_000003,time_19108064,execs_95159,op_quick,pos_1774.buzz b/tests/fuzzed/id_000045,src_000003,time_19108064,execs_95159,op_quick,pos_1774.buzz index d0fc7fcd..ff040ded 100644 --- a/tests/fuzzed/id_000045,src_000003,time_19108064,execs_95159,op_quick,pos_1774.buzz +++ b/tests/fuzzed/id_000045,src_000003,time_19108064,execs_95159,op_quick,pos_1774.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000046,src_000029,time_20042119,execs_98972,op_quick,pos_215,val_+4.buzz b/tests/fuzzed/id_000046,src_000029,time_20042119,execs_98972,op_quick,pos_215,val_+4.buzz index 68a6c310..89f6ae83 100644 --- a/tests/fuzzed/id_000046,src_000029,time_20042119,execs_98972,op_quick,pos_215,val_+4.buzz +++ b/tests/fuzzed/id_000046,src_000029,time_20042119,execs_98972,op_quick,pos_215,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000047,src_000029,time_20216929,execs_99679,op_quick,pos_825,val_+4.buzz b/tests/fuzzed/id_000047,src_000029,time_20216929,execs_99679,op_quick,pos_825,val_+4.buzz index ecf43564..fe79d3df 100644 --- a/tests/fuzzed/id_000047,src_000029,time_20216929,execs_99679,op_quick,pos_825,val_+4.buzz +++ b/tests/fuzzed/id_000047,src_000029,time_20216929,execs_99679,op_quick,pos_825,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000048,src_000029,time_20292375,execs_99967,op_quick,pos_1112,val_+4.buzz b/tests/fuzzed/id_000048,src_000029,time_20292375,execs_99967,op_quick,pos_1112,val_+4.buzz index 31344775..09d5f516 100644 --- a/tests/fuzzed/id_000048,src_000029,time_20292375,execs_99967,op_quick,pos_1112,val_+4.buzz +++ b/tests/fuzzed/id_000048,src_000029,time_20292375,execs_99967,op_quick,pos_1112,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000049,src_000043,time_21516152,execs_105200,op_quick,pos_228,val_+3.buzz b/tests/fuzzed/id_000049,src_000043,time_21516152,execs_105200,op_quick,pos_228,val_+3.buzz index cf485857..cd74986c 100644 --- a/tests/fuzzed/id_000049,src_000043,time_21516152,execs_105200,op_quick,pos_228,val_+3.buzz +++ b/tests/fuzzed/id_000049,src_000043,time_21516152,execs_105200,op_quick,pos_228,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000050,src_000043,time_21589771,execs_105475,op_quick,pos_454,val_+3.buzz b/tests/fuzzed/id_000050,src_000043,time_21589771,execs_105475,op_quick,pos_454,val_+3.buzz index 7bf66910..20f944bb 100644 --- a/tests/fuzzed/id_000050,src_000043,time_21589771,execs_105475,op_quick,pos_454,val_+3.buzz +++ b/tests/fuzzed/id_000050,src_000043,time_21589771,execs_105475,op_quick,pos_454,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000051,src_000043,time_21654674,execs_105711,op_quick,pos_653,val_+3.buzz b/tests/fuzzed/id_000051,src_000043,time_21654674,execs_105711,op_quick,pos_653,val_+3.buzz index 7999c2f6..581842c7 100644 --- a/tests/fuzzed/id_000051,src_000043,time_21654674,execs_105711,op_quick,pos_653,val_+3.buzz +++ b/tests/fuzzed/id_000051,src_000043,time_21654674,execs_105711,op_quick,pos_653,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000052,src_000043,time_21728271,execs_105976,op_quick,pos_869,val_+3.buzz b/tests/fuzzed/id_000052,src_000043,time_21728271,execs_105976,op_quick,pos_869,val_+3.buzz index ce80c7f5..23865475 100644 --- a/tests/fuzzed/id_000052,src_000043,time_21728271,execs_105976,op_quick,pos_869,val_+3.buzz +++ b/tests/fuzzed/id_000052,src_000043,time_21728271,execs_105976,op_quick,pos_869,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000053,src_000043,time_21821873,execs_106306,op_quick,pos_1162,val_+3.buzz b/tests/fuzzed/id_000053,src_000043,time_21821873,execs_106306,op_quick,pos_1162,val_+3.buzz index 9e9cacff..2f980560 100644 --- a/tests/fuzzed/id_000053,src_000043,time_21821873,execs_106306,op_quick,pos_1162,val_+3.buzz +++ b/tests/fuzzed/id_000053,src_000043,time_21821873,execs_106306,op_quick,pos_1162,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000054,src_000043,time_22766394,execs_109675,op_havoc,rep_2.buzz b/tests/fuzzed/id_000054,src_000043,time_22766394,execs_109675,op_havoc,rep_2.buzz index f3919d58..623ee558 100644 --- a/tests/fuzzed/id_000054,src_000043,time_22766394,execs_109675,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000054,src_000043,time_22766394,execs_109675,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000055,src_001513,time_24308324,execs_115372,op_quick,pos_418,val_+2.buzz b/tests/fuzzed/id_000055,src_001513,time_24308324,execs_115372,op_quick,pos_418,val_+2.buzz index ddb4c225..de58ca9d 100644 --- a/tests/fuzzed/id_000055,src_001513,time_24308324,execs_115372,op_quick,pos_418,val_+2.buzz +++ b/tests/fuzzed/id_000055,src_001513,time_24308324,execs_115372,op_quick,pos_418,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000056,src_001513,time_24612052,execs_116487,op_quick,pos_1520,val_+2.buzz b/tests/fuzzed/id_000056,src_001513,time_24612052,execs_116487,op_quick,pos_1520,val_+2.buzz index aad02c5d..16b8dc48 100644 --- a/tests/fuzzed/id_000056,src_001513,time_24612052,execs_116487,op_quick,pos_1520,val_+2.buzz +++ b/tests/fuzzed/id_000056,src_001513,time_24612052,execs_116487,op_quick,pos_1520,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000058,src_000062,time_26613047,execs_124255,op_quick,pos_105,val_+3.buzz b/tests/fuzzed/id_000058,src_000062,time_26613047,execs_124255,op_quick,pos_105,val_+3.buzz index e9cdd0c5..c02a922f 100644 --- a/tests/fuzzed/id_000058,src_000062,time_26613047,execs_124255,op_quick,pos_105,val_+3.buzz +++ b/tests/fuzzed/id_000058,src_000062,time_26613047,execs_124255,op_quick,pos_105,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000059,sig_06,src_000013,time_1038554,execs_19208,op_flip16,pos_7.buzz b/tests/fuzzed/id_000059,sig_06,src_000013,time_1038554,execs_19208,op_flip16,pos_7.buzz index 47caadab..d7fe3111 100644 --- a/tests/fuzzed/id_000059,sig_06,src_000013,time_1038554,execs_19208,op_flip16,pos_7.buzz +++ b/tests/fuzzed/id_000059,sig_06,src_000013,time_1038554,execs_19208,op_flip16,pos_7.buzz @@ -1,4 +1,4 @@ -import int, assert from "std"; +import int, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, message: "yeah!"); diff --git a/tests/fuzzed/id_000059,src_000062,time_26638975,execs_124340,op_quick,pos_165,val_+3.buzz b/tests/fuzzed/id_000059,src_000062,time_26638975,execs_124340,op_quick,pos_165,val_+3.buzz index 30345c29..bfcc1f14 100644 --- a/tests/fuzzed/id_000059,src_000062,time_26638975,execs_124340,op_quick,pos_165,val_+3.buzz +++ b/tests/fuzzed/id_000059,src_000062,time_26638975,execs_124340,op_quick,pos_165,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000060,sig_06,src_000013,time_1046996,execs_19259,op_flip32,pos_13.buzz b/tests/fuzzed/id_000060,sig_06,src_000013,time_1046996,execs_19259,op_flip32,pos_13.buzz index 3cf67858..21a5fe9f 100644 --- a/tests/fuzzed/id_000060,sig_06,src_000013,time_1046996,execs_19259,op_flip32,pos_13.buzz +++ b/tests/fuzzed/id_000060,sig_06,src_000013,time_1046996,execs_19259,op_flip32,pos_13.buzz @@ -1,4 +1,4 @@ -import print,ߞert from "std"; +import print,ߞert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, message: "yeah!"); diff --git a/tests/fuzzed/id_000060,src_000062,time_26660362,execs_124411,op_quick,pos_223,val_+3.buzz b/tests/fuzzed/id_000060,src_000062,time_26660362,execs_124411,op_quick,pos_223,val_+3.buzz index 364250c3..2f7ba09c 100644 --- a/tests/fuzzed/id_000060,src_000062,time_26660362,execs_124411,op_quick,pos_223,val_+3.buzz +++ b/tests/fuzzed/id_000060,src_000062,time_26660362,execs_124411,op_quick,pos_223,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000061,sig_06,src_000013,time_1106817,execs_19778,op_arith8,pos_31,val_+5.buzz b/tests/fuzzed/id_000061,sig_06,src_000013,time_1106817,execs_19778,op_arith8,pos_31,val_+5.buzz index ad771279..cbbadd14 100644 --- a/tests/fuzzed/id_000061,sig_06,src_000013,time_1106817,execs_19778,op_arith8,pos_31,val_+5.buzz +++ b/tests/fuzzed/id_000061,sig_06,src_000013,time_1106817,execs_19778,op_arith8,pos_31,val_+5.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"@ +import print, assert from "buzz:std"@ test "Using a function coming from a library" { std\assert(true, message: "yeah!"); diff --git a/tests/fuzzed/id_000061,src_000062,time_26680548,execs_124482,op_quick,pos_281,val_+3.buzz b/tests/fuzzed/id_000061,src_000062,time_26680548,execs_124482,op_quick,pos_281,val_+3.buzz index 3e880985..fbfcfb96 100644 --- a/tests/fuzzed/id_000061,src_000062,time_26680548,execs_124482,op_quick,pos_281,val_+3.buzz +++ b/tests/fuzzed/id_000061,src_000062,time_26680548,execs_124482,op_quick,pos_281,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000062,sig_06,src_000013,time_1116204,execs_19905,op_arith8,pos_32,val_+26.buzz b/tests/fuzzed/id_000062,sig_06,src_000013,time_1116204,execs_19905,op_arith8,pos_32,val_+26.buzz index 1d6fc68e..70ffd3f7 100644 --- a/tests/fuzzed/id_000062,sig_06,src_000013,time_1116204,execs_19905,op_arith8,pos_32,val_+26.buzz +++ b/tests/fuzzed/id_000062,sig_06,src_000013,time_1116204,execs_19905,op_arith8,pos_32,val_+26.buzz @@ -1,4 +1,4 @@ -import print, assert from "std";$ +import print, assert from "buzz:std";$ test "Using a function coming from a library" { std\assert(true, message: "yeah!"); std\print("wat"); diff --git a/tests/fuzzed/id_000062,src_000062,time_26699147,execs_124542,op_quick,pos_340,val_+3.buzz b/tests/fuzzed/id_000062,src_000062,time_26699147,execs_124542,op_quick,pos_340,val_+3.buzz index 4a0332d1..180192e1 100644 --- a/tests/fuzzed/id_000062,src_000062,time_26699147,execs_124542,op_quick,pos_340,val_+3.buzz +++ b/tests/fuzzed/id_000062,src_000062,time_26699147,execs_124542,op_quick,pos_340,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000063,sig_06,src_000013,time_1337862,execs_20767,op_arith8,pos_142,val_+5.buzz b/tests/fuzzed/id_000063,sig_06,src_000013,time_1337862,execs_20767,op_arith8,pos_142,val_+5.buzz index a061858c..bf589bb0 100644 --- a/tests/fuzzed/id_000063,sig_06,src_000013,time_1337862,execs_20767,op_arith8,pos_142,val_+5.buzz +++ b/tests/fuzzed/id_000063,sig_06,src_000013,time_1337862,execs_20767,op_arith8,pos_142,val_+5.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, message: "yeah!"); diff --git a/tests/fuzzed/id_000063,src_000062,time_26732156,execs_124652,op_quick,pos_413,val_+3.buzz b/tests/fuzzed/id_000063,src_000062,time_26732156,execs_124652,op_quick,pos_413,val_+3.buzz index 2a0d5723..294c760b 100644 --- a/tests/fuzzed/id_000063,src_000062,time_26732156,execs_124652,op_quick,pos_413,val_+3.buzz +++ b/tests/fuzzed/id_000063,src_000062,time_26732156,execs_124652,op_quick,pos_413,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000064,sig_06,src_000013,time_2034525,execs_25498,op_havoc,rep_4.buzz b/tests/fuzzed/id_000064,sig_06,src_000013,time_2034525,execs_25498,op_havoc,rep_4.buzz index 48ad4c2b..1f436f03 100644 --- a/tests/fuzzed/id_000064,sig_06,src_000013,time_2034525,execs_25498,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000064,sig_06,src_000013,time_2034525,execs_25498,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -`mport print, assert from "std"; +`mport print, assert from "buzz:std"; test "Using } function coming frluused"; diff --git a/tests/fuzzed/id_000064,src_000062,time_26749328,execs_124710,op_quick,pos_470,val_+3.buzz b/tests/fuzzed/id_000064,src_000062,time_26749328,execs_124710,op_quick,pos_470,val_+3.buzz index c4facf61..808a93e0 100644 --- a/tests/fuzzed/id_000064,src_000062,time_26749328,execs_124710,op_quick,pos_470,val_+3.buzz +++ b/tests/fuzzed/id_000064,src_000062,time_26749328,execs_124710,op_quick,pos_470,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000065,sig_06,src_000013,time_2092469,execs_25900,op_havoc,rep_1.buzz b/tests/fuzzed/id_000065,sig_06,src_000013,time_2092469,execs_25900,op_havoc,rep_1.buzz index 79242def..c941a6ea 100644 --- a/tests/fuzzed/id_000065,sig_06,src_000013,time_2092469,execs_25900,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000065,sig_06,src_000013,time_2092469,execs_25900,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\assert(true, message: "yeah!")@ diff --git a/tests/fuzzed/id_000065,src_000062,time_26766350,execs_124771,op_quick,pos_518,val_+3.buzz b/tests/fuzzed/id_000065,src_000062,time_26766350,execs_124771,op_quick,pos_518,val_+3.buzz index 2ec6a1cc..bbdd5535 100644 --- a/tests/fuzzed/id_000065,src_000062,time_26766350,execs_124771,op_quick,pos_518,val_+3.buzz +++ b/tests/fuzzed/id_000065,src_000062,time_26766350,execs_124771,op_quick,pos_518,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000066,sig_11,src_000013,time_2172493,execs_26420,op_havoc,rep_2.buzz b/tests/fuzzed/id_000066,sig_11,src_000013,time_2172493,execs_26420,op_havoc,rep_2.buzz index 553a311f..133773ec 100644 --- a/tests/fuzzed/id_000066,sig_11,src_000013,time_2172493,execs_26420,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000066,sig_11,src_000013,time_2172493,execs_26420,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import print, assert from "std"; +import print, assert from "buzz:std"; test "Using a function coming from a library" { std\Ussert(true, message: "yeah!"); diff --git a/tests/fuzzed/id_000066,src_000062,time_26785044,execs_124841,op_quick,pos_575,val_+3.buzz b/tests/fuzzed/id_000066,src_000062,time_26785044,execs_124841,op_quick,pos_575,val_+3.buzz index 58cc06c7..94df694b 100644 --- a/tests/fuzzed/id_000066,src_000062,time_26785044,execs_124841,op_quick,pos_575,val_+3.buzz +++ b/tests/fuzzed/id_000066,src_000062,time_26785044,execs_124841,op_quick,pos_575,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000067,sig_06,src_000008,time_2538361,execs_28186,op_quick,pos_56,val_+1.buzz b/tests/fuzzed/id_000067,sig_06,src_000008,time_2538361,execs_28186,op_quick,pos_56,val_+1.buzz index d9ec27e5..3d53c056 100644 --- a/tests/fuzzed/id_000067,sig_06,src_000008,time_2538361,execs_28186,op_quick,pos_56,val_+1.buzz +++ b/tests/fuzzed/id_000067,sig_06,src_000008,time_2538361,execs_28186,op_quick,pos_56,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false;@ object Kill { diff --git a/tests/fuzzed/id_000067,src_000062,time_26801799,execs_124902,op_quick,pos_623,val_+3.buzz b/tests/fuzzed/id_000067,src_000062,time_26801799,execs_124902,op_quick,pos_623,val_+3.buzz index 1ec2ed4d..55b43bbd 100644 --- a/tests/fuzzed/id_000067,src_000062,time_26801799,execs_124902,op_quick,pos_623,val_+3.buzz +++ b/tests/fuzzed/id_000067,src_000062,time_26801799,execs_124902,op_quick,pos_623,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000068,sig_06,src_000008,time_2566540,execs_28302,op_quick,pos_81,val_+1.buzz b/tests/fuzzed/id_000068,sig_06,src_000008,time_2566540,execs_28302,op_quick,pos_81,val_+1.buzz index 7365c9a3..9cf8bcb6 100644 --- a/tests/fuzzed/id_000068,sig_06,src_000008,time_2566540,execs_28302,op_quick,pos_81,val_+1.buzz +++ b/tests/fuzzed/id_000068,sig_06,src_000008,time_2566540,execs_28302,op_quick,pos_81,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000068,src_000062,time_26828586,execs_124990,op_quick,pos_698,val_+3.buzz b/tests/fuzzed/id_000068,src_000062,time_26828586,execs_124990,op_quick,pos_698,val_+3.buzz index 87af6be8..afb6dea3 100644 --- a/tests/fuzzed/id_000068,src_000062,time_26828586,execs_124990,op_quick,pos_698,val_+3.buzz +++ b/tests/fuzzed/id_000068,src_000062,time_26828586,execs_124990,op_quick,pos_698,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000069,sig_06,src_000008,time_2614555,execs_28454,op_quick,pos_113,val_+1.buzz b/tests/fuzzed/id_000069,sig_06,src_000008,time_2614555,execs_28454,op_quick,pos_113,val_+1.buzz index ba619b7f..08ca5179 100644 --- a/tests/fuzzed/id_000069,sig_06,src_000008,time_2614555,execs_28454,op_quick,pos_113,val_+1.buzz +++ b/tests/fuzzed/id_000069,sig_06,src_000008,time_2614555,execs_28454,op_quick,pos_113,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000069,src_000062,time_26850392,execs_125070,op_quick,pos_765,val_+3.buzz b/tests/fuzzed/id_000069,src_000062,time_26850392,execs_125070,op_quick,pos_765,val_+3.buzz index 863903a3..ee1a6ca7 100644 --- a/tests/fuzzed/id_000069,src_000062,time_26850392,execs_125070,op_quick,pos_765,val_+3.buzz +++ b/tests/fuzzed/id_000069,src_000062,time_26850392,execs_125070,op_quick,pos_765,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000070,sig_06,src_000008,time_3510036,execs_31594,op_havoc,rep_8.buzz b/tests/fuzzed/id_000070,sig_06,src_000008,time_3510036,execs_31594,op_havoc,rep_8.buzz index a56b0523..9e2923d6 100644 --- a/tests/fuzzed/id_000070,sig_06,src_000008,time_3510036,execs_31594,op_havoc,rep_8.buzz +++ b/tests/fuzzed/id_000070,sig_06,src_000008,time_3510036,execs_31594,op_havoc,rep_8.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectooCalled = false; diff --git a/tests/fuzzed/id_000070,src_000062,time_26869125,execs_125130,op_quick,pos_824,val_+3.buzz b/tests/fuzzed/id_000070,src_000062,time_26869125,execs_125130,op_quick,pos_824,val_+3.buzz index f36804dc..e44168e4 100644 --- a/tests/fuzzed/id_000070,src_000062,time_26869125,execs_125130,op_quick,pos_824,val_+3.buzz +++ b/tests/fuzzed/id_000070,src_000062,time_26869125,execs_125130,op_quick,pos_824,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000071,sig_06,src_000008,time_3606862,execs_31986,op_havoc,rep_7.buzz b/tests/fuzzed/id_000071,sig_06,src_000008,time_3606862,execs_31986,op_havoc,rep_7.buzz index 06b54c1e..b0359997 100644 --- a/tests/fuzzed/id_000071,sig_06,src_000008,time_3606862,execs_31986,op_havoc,rep_7.buzz +++ b/tests/fuzzed/id_000071,sig_06,src_000008,time_3606862,execs_31986,op_havoc,rep_7.buzz @@ -1,5 +1,5 @@ import "= Kill{ yo = i }; // Sho}ldstd"; -import "gc"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000071,src_000062,time_26897575,execs_125220,op_quick,pos_889,val_+3.buzz b/tests/fuzzed/id_000071,src_000062,time_26897575,execs_125220,op_quick,pos_889,val_+3.buzz index a9b75da9..fa05ea58 100644 --- a/tests/fuzzed/id_000071,src_000062,time_26897575,execs_125220,op_quick,pos_889,val_+3.buzz +++ b/tests/fuzzed/id_000071,src_000062,time_26897575,execs_125220,op_quick,pos_889,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000072,sig_06,src_000008,time_4056407,execs_33850,op_havoc,rep_3.buzz b/tests/fuzzed/id_000072,sig_06,src_000008,time_4056407,execs_33850,op_havoc,rep_3.buzz index 14a209d7..e6b6521a 100644 --- a/tests/fuzzed/id_000072,sig_06,src_000008,time_4056407,execs_33850,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000072,sig_06,src_000008,time_4056407,execs_33850,op_havoc,rep_3.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000072,src_000062,time_26955312,execs_125414,op_quick,pos_1058,val_+3.buzz b/tests/fuzzed/id_000072,src_000062,time_26955312,execs_125414,op_quick,pos_1058,val_+3.buzz index c80ebd4d..59705993 100644 --- a/tests/fuzzed/id_000072,src_000062,time_26955312,execs_125414,op_quick,pos_1058,val_+3.buzz +++ b/tests/fuzzed/id_000072,src_000062,time_26955312,execs_125414,op_quick,pos_1058,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000073,sig_06,src_000008,time_4061094,execs_33873,op_havoc,rep_4.buzz b/tests/fuzzed/id_000073,sig_06,src_000008,time_4061094,execs_33873,op_havoc,rep_4.buzz index 2e465b0a..049a920e 100644 --- a/tests/fuzzed/id_000073,sig_06,src_000008,time_4061094,execs_33873,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000073,sig_06,src_000008,time_4061094,execs_33873,op_havoc,rep_4.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000073,src_000062,time_26985803,execs_125519,op_quick,pos_1162,val_+3.buzz b/tests/fuzzed/id_000073,src_000062,time_26985803,execs_125519,op_quick,pos_1162,val_+3.buzz index 8c03678d..2e9e1cc7 100644 --- a/tests/fuzzed/id_000073,src_000062,time_26985803,execs_125519,op_quick,pos_1162,val_+3.buzz +++ b/tests/fuzzed/id_000073,src_000062,time_26985803,execs_125519,op_quick,pos_1162,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000074,src_000062,time_27343581,execs_126803,op_havoc,rep_1.buzz b/tests/fuzzed/id_000074,src_000062,time_27343581,execs_126803,op_havoc,rep_1.buzz index b44a50a4..fb009c4d 100644 --- a/tests/fuzzed/id_000074,src_000062,time_27343581,execs_126803,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000074,src_000062,time_27343581,execs_126803,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000075,sig_06,src_000008,time_4631215,execs_36218,op_havoc,rep_3.buzz b/tests/fuzzed/id_000075,sig_06,src_000008,time_4631215,execs_36218,op_havoc,rep_3.buzz index a98aae4e..fbc4c8a2 100644 --- a/tests/fuzzed/id_000075,sig_06,src_000008,time_4631215,execs_36218,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000075,sig_06,src_000008,time_4631215,execs_36218,op_havoc,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; import "Oc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000075,src_000062,time_27428500,execs_127060,op_havoc,rep_2.buzz b/tests/fuzzed/id_000075,src_000062,time_27428500,execs_127060,op_havoc,rep_2.buzz index bd514aa3..bc133a43 100644 --- a/tests/fuzzed/id_000075,src_000062,time_27428500,execs_127060,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000075,src_000062,time_27428500,execs_127060,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000076,sig_06,src_000055,time_5407943,execs_39064,op_quick,pos_26,val_+1.buzz b/tests/fuzzed/id_000076,sig_06,src_000055,time_5407943,execs_39064,op_quick,pos_26,val_+1.buzz index 1d7bd7b6..53714ce0 100644 --- a/tests/fuzzed/id_000076,sig_06,src_000055,time_5407943,execs_39064,op_quick,pos_26,val_+1.buzz +++ b/tests/fuzzed/id_000076,sig_06,src_000055,time_5407943,execs_39064,op_quick,pos_26,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Paylfad:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000076,src_000062,time_27508860,execs_127320,op_havoc,rep_1.buzz b/tests/fuzzed/id_000076,src_000062,time_27508860,execs_127320,op_havoc,rep_1.buzz index a512287b..da1521a7 100644 --- a/tests/fuzzed/id_000076,src_000062,time_27508860,execs_127320,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000076,src_000062,time_27508860,execs_127320,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000077,sig_06,src_000055,time_5426024,execs_39154,op_quick,pos_44,val_+1.buzz b/tests/fuzzed/id_000077,sig_06,src_000055,time_5426024,execs_39154,op_quick,pos_44,val_+1.buzz index 6b310d5d..9af60157 100644 --- a/tests/fuzzed/id_000077,sig_06,src_000055,time_5426024,execs_39154,op_quick,pos_44,val_+1.buzz +++ b/tests/fuzzed/id_000077,sig_06,src_000055,time_5426024,execs_39154,op_quick,pos_44,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { lata: mut {K: V}, diff --git a/tests/fuzzed/id_000077,src_000062,time_28280222,execs_129828,op_havoc,rep_2.buzz b/tests/fuzzed/id_000077,src_000062,time_28280222,execs_129828,op_havoc,rep_2.buzz index f480d738..df6666dd 100644 --- a/tests/fuzzed/id_000077,src_000062,time_28280222,execs_129828,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000077,src_000062,time_28280222,execs_129828,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000078,sig_06,src_000055,time_5433289,execs_39190,op_quick,pos_56,val_+1.buzz b/tests/fuzzed/id_000078,sig_06,src_000055,time_5433289,execs_39190,op_quick,pos_56,val_+1.buzz index 2142bd91..6247a061 100644 --- a/tests/fuzzed/id_000078,sig_06,src_000055,time_5433289,execs_39190,op_quick,pos_56,val_+1.buzz +++ b/tests/fuzzed/id_000078,sig_06,src_000055,time_5433289,execs_39190,op_quick,pos_56,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K V}, diff --git a/tests/fuzzed/id_000078,src_000014,time_28520594,execs_130825,op_quick,pos_320,val_+1.buzz b/tests/fuzzed/id_000078,src_000014,time_28520594,execs_130825,op_quick,pos_320,val_+1.buzz index b1519261..a0a51862 100644 --- a/tests/fuzzed/id_000078,src_000014,time_28520594,execs_130825,op_quick,pos_320,val_+1.buzz +++ b/tests/fuzzed/id_000078,src_000014,time_28520594,execs_130825,op_quick,pos_320,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Escape sequences" { std\print("\{escaped interpolation}, \nhello\tworld, backslash \\ \"hey\""); diff --git a/tests/fuzzed/id_000079,sig_06,src_000055,time_5459686,execs_39316,op_quick,pos_122,val_+1.buzz b/tests/fuzzed/id_000079,sig_06,src_000055,time_5459686,execs_39316,op_quick,pos_122,val_+1.buzz index fadc3509..8af2f959 100644 --- a/tests/fuzzed/id_000079,sig_06,src_000055,time_5459686,execs_39316,op_quick,pos_122,val_+1.buzz +++ b/tests/fuzzed/id_000079,sig_06,src_000055,time_5459686,execs_39316,op_quick,pos_122,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000079,src_000037,time_29046037,execs_133312,op_quick,pos_326,val_+3.buzz b/tests/fuzzed/id_000079,src_000037,time_29046037,execs_133312,op_quick,pos_326,val_+3.buzz index 966dcdd6..9836fd45 100644 --- a/tests/fuzzed/id_000079,src_000037,time_29046037,execs_133312,op_quick,pos_326,val_+3.buzz +++ b/tests/fuzzed/id_000079,src_000037,time_29046037,execs_133312,op_quick,pos_326,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "continue properly jumps and closes scope" { foreach (value in 1..5) { diff --git a/tests/fuzzed/id_000080,sig_06,src_000055,time_5478330,execs_39405,op_quick,pos_151,val_+1.buzz b/tests/fuzzed/id_000080,sig_06,src_000055,time_5478330,execs_39405,op_quick,pos_151,val_+1.buzz index 9b1a192a..ae5cde23 100644 --- a/tests/fuzzed/id_000080,sig_06,src_000055,time_5478330,execs_39405,op_quick,pos_151,val_+1.buzz +++ b/tests/fuzzed/id_000080,sig_06,src_000055,time_5478330,execs_39405,op_quick,pos_151,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000080,src_000037,time_29140727,execs_133730,op_quick,pos_712,val_+3.buzz b/tests/fuzzed/id_000080,src_000037,time_29140727,execs_133730,op_quick,pos_712,val_+3.buzz index 877cbd17..d509c4c3 100644 --- a/tests/fuzzed/id_000080,src_000037,time_29140727,execs_133730,op_quick,pos_712,val_+3.buzz +++ b/tests/fuzzed/id_000080,src_000037,time_29140727,execs_133730,op_quick,pos_712,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "continue properly jumps and closes scope" { foreach (value in 1..5) { diff --git a/tests/fuzzed/id_000081,sig_06,src_000055,time_5520960,execs_39604,op_quick,pos_230,val_+1.buzz b/tests/fuzzed/id_000081,sig_06,src_000055,time_5520960,execs_39604,op_quick,pos_230,val_+1.buzz index 7c21df83..513d096d 100644 --- a/tests/fuzzed/id_000081,sig_06,src_000055,time_5520960,execs_39604,op_quick,pos_230,val_+1.buzz +++ b/tests/fuzzed/id_000081,sig_06,src_000055,time_5520960,execs_39604,op_quick,pos_230,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000081,src_000048,time_30658481,execs_148166,op_quick,pos_273,val_+1.buzz b/tests/fuzzed/id_000081,src_000048,time_30658481,execs_148166,op_quick,pos_273,val_+1.buzz index d5ca352e..22627c57 100644 --- a/tests/fuzzed/id_000081,src_000048,time_30658481,execs_148166,op_quick,pos_273,val_+1.buzz +++ b/tests/fuzzed/id_000081,src_000048,time_30658481,execs_148166,op_quick,pos_273,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000082,sig_06,src_000055,time_5521136,execs_39605,op_quick,pos_231,val_+1.buzz b/tests/fuzzed/id_000082,sig_06,src_000055,time_5521136,execs_39605,op_quick,pos_231,val_+1.buzz index 58104ff5..48761bf0 100644 --- a/tests/fuzzed/id_000082,sig_06,src_000055,time_5521136,execs_39605,op_quick,pos_231,val_+1.buzz +++ b/tests/fuzzed/id_000082,sig_06,src_000055,time_5521136,execs_39605,op_quick,pos_231,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000082,src_000048,time_30684031,execs_148255,op_quick,pos_361,val_+1.buzz b/tests/fuzzed/id_000082,src_000048,time_30684031,execs_148255,op_quick,pos_361,val_+1.buzz index beef48b8..15b49817 100644 --- a/tests/fuzzed/id_000082,src_000048,time_30684031,execs_148255,op_quick,pos_361,val_+1.buzz +++ b/tests/fuzzed/id_000082,src_000048,time_30684031,execs_148255,op_quick,pos_361,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000083,sig_06,src_000055,time_5536649,execs_39679,op_quick,pos_245,val_+1.buzz b/tests/fuzzed/id_000083,sig_06,src_000055,time_5536649,execs_39679,op_quick,pos_245,val_+1.buzz index 924e6fe3..dc84cecf 100644 --- a/tests/fuzzed/id_000083,sig_06,src_000055,time_5536649,execs_39679,op_quick,pos_245,val_+1.buzz +++ b/tests/fuzzed/id_000083,sig_06,src_000055,time_5536649,execs_39679,op_quick,pos_245,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000083,src_000048,time_30709291,execs_148343,op_quick,pos_436,val_+1.buzz b/tests/fuzzed/id_000083,src_000048,time_30709291,execs_148343,op_quick,pos_436,val_+1.buzz index 597052ef..d05163dd 100644 --- a/tests/fuzzed/id_000083,src_000048,time_30709291,execs_148343,op_quick,pos_436,val_+1.buzz +++ b/tests/fuzzed/id_000083,src_000048,time_30709291,execs_148343,op_quick,pos_436,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000084,sig_06,src_000055,time_5552734,execs_39749,op_quick,pos_314,val_+1.buzz b/tests/fuzzed/id_000084,sig_06,src_000055,time_5552734,execs_39749,op_quick,pos_314,val_+1.buzz index 8604ee7f..77fe8d92 100644 --- a/tests/fuzzed/id_000084,sig_06,src_000055,time_5552734,execs_39749,op_quick,pos_314,val_+1.buzz +++ b/tests/fuzzed/id_000084,sig_06,src_000055,time_5552734,execs_39749,op_quick,pos_314,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000084,src_000048,time_30755833,execs_148502,op_quick,pos_582,val_+1.buzz b/tests/fuzzed/id_000084,src_000048,time_30755833,execs_148502,op_quick,pos_582,val_+1.buzz index b929d9b2..ebe53544 100644 --- a/tests/fuzzed/id_000084,src_000048,time_30755833,execs_148502,op_quick,pos_582,val_+1.buzz +++ b/tests/fuzzed/id_000084,src_000048,time_30755833,execs_148502,op_quick,pos_582,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000085,sig_06,src_000055,time_5604619,execs_39983,op_flip1,pos_60.buzz b/tests/fuzzed/id_000085,sig_06,src_000055,time_5604619,execs_39983,op_flip1,pos_60.buzz index 5abf6739..1dbe7790 100644 --- a/tests/fuzzed/id_000085,sig_06,src_000055,time_5604619,execs_39983,op_flip1,pos_60.buzz +++ b/tests/fuzzed/id_000085,sig_06,src_000055,time_5604619,execs_39983,op_flip1,pos_60.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}$ diff --git a/tests/fuzzed/id_000085,src_000048,time_30778751,execs_148584,op_quick,pos_651,val_+1.buzz b/tests/fuzzed/id_000085,src_000048,time_30778751,execs_148584,op_quick,pos_651,val_+1.buzz index 57526e74..f06e0d7e 100644 --- a/tests/fuzzed/id_000085,src_000048,time_30778751,execs_148584,op_quick,pos_651,val_+1.buzz +++ b/tests/fuzzed/id_000085,src_000048,time_30778751,execs_148584,op_quick,pos_651,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000086,sig_06,src_000055,time_5630503,execs_40108,op_flip1,pos_186.buzz b/tests/fuzzed/id_000086,sig_06,src_000055,time_5630503,execs_40108,op_flip1,pos_186.buzz index a45feef9..0fbf4aa8 100644 --- a/tests/fuzzed/id_000086,sig_06,src_000055,time_5630503,execs_40108,op_flip1,pos_186.buzz +++ b/tests/fuzzed/id_000086,sig_06,src_000055,time_5630503,execs_40108,op_flip1,pos_186.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000086,src_000048,time_30828467,execs_148754,op_quick,pos_796,val_+1.buzz b/tests/fuzzed/id_000086,src_000048,time_30828467,execs_148754,op_quick,pos_796,val_+1.buzz index d77ecfc9..c4da69f1 100644 --- a/tests/fuzzed/id_000086,src_000048,time_30828467,execs_148754,op_quick,pos_796,val_+1.buzz +++ b/tests/fuzzed/id_000086,src_000048,time_30828467,execs_148754,op_quick,pos_796,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000087,sig_06,src_000055,time_5700746,execs_40445,op_flip2,pos_186.buzz b/tests/fuzzed/id_000087,sig_06,src_000055,time_5700746,execs_40445,op_flip2,pos_186.buzz index 639619bc..a3d2c7fe 100644 --- a/tests/fuzzed/id_000087,sig_06,src_000055,time_5700746,execs_40445,op_flip2,pos_186.buzz +++ b/tests/fuzzed/id_000087,sig_06,src_000055,time_5700746,execs_40445,op_flip2,pos_186.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000087,src_000048,time_30855954,execs_148843,op_quick,pos_872,val_+1.buzz b/tests/fuzzed/id_000087,src_000048,time_30855954,execs_148843,op_quick,pos_872,val_+1.buzz index f18aade7..3569a030 100644 --- a/tests/fuzzed/id_000087,src_000048,time_30855954,execs_148843,op_quick,pos_872,val_+1.buzz +++ b/tests/fuzzed/id_000087,src_000048,time_30855954,execs_148843,op_quick,pos_872,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000088,sig_06,src_000055,time_5713841,execs_40506,op_flip2,pos_239.buzz b/tests/fuzzed/id_000088,sig_06,src_000055,time_5713841,execs_40506,op_flip2,pos_239.buzz index 563a3aca..3f77aa04 100644 --- a/tests/fuzzed/id_000088,sig_06,src_000055,time_5713841,execs_40506,op_flip2,pos_239.buzz +++ b/tests/fuzzed/id_000088,sig_06,src_000055,time_5713841,execs_40506,op_flip2,pos_239.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000088,src_000048,time_30898019,execs_148990,op_quick,pos_982,val_+1.buzz b/tests/fuzzed/id_000088,src_000048,time_30898019,execs_148990,op_quick,pos_982,val_+1.buzz index cb5498c1..dcff4d61 100644 --- a/tests/fuzzed/id_000088,src_000048,time_30898019,execs_148990,op_quick,pos_982,val_+1.buzz +++ b/tests/fuzzed/id_000088,src_000048,time_30898019,execs_148990,op_quick,pos_982,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000089,sig_06,src_000055,time_5790667,execs_40876,op_flip4,pos_239.buzz b/tests/fuzzed/id_000089,sig_06,src_000055,time_5790667,execs_40876,op_flip4,pos_239.buzz index 6030ab80..38d5caff 100644 --- a/tests/fuzzed/id_000089,sig_06,src_000055,time_5790667,execs_40876,op_flip4,pos_239.buzz +++ b/tests/fuzzed/id_000089,sig_06,src_000055,time_5790667,execs_40876,op_flip4,pos_239.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000089,src_001899,time_31699360,execs_151545,op_havoc,rep_1.buzz b/tests/fuzzed/id_000089,src_001899,time_31699360,execs_151545,op_havoc,rep_1.buzz index 96613944..64a13b73 100644 --- a/tests/fuzzed/id_000089,src_001899,time_31699360,execs_151545,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000089,src_001899,time_31699360,execs_151545,op_havoc,rep_1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000090,sig_06,src_000055,time_5793602,execs_40890,op_flip4,pos_243.buzz b/tests/fuzzed/id_000090,sig_06,src_000055,time_5793602,execs_40890,op_flip4,pos_243.buzz index 3b10cb18..77cec220 100644 --- a/tests/fuzzed/id_000090,sig_06,src_000055,time_5793602,execs_40890,op_flip4,pos_243.buzz +++ b/tests/fuzzed/id_000090,sig_06,src_000055,time_5793602,execs_40890,op_flip4,pos_243.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000090,src_000023,time_32133122,execs_152343,op_quick,pos_102.buzz b/tests/fuzzed/id_000090,src_000023,time_32133122,execs_152343,op_quick,pos_102.buzz index 780da38b..d514e0d2 100644 --- a/tests/fuzzed/id_000090,src_000023,time_32133122,execs_152343,op_quick,pos_102.buzz +++ b/tests/fuzzed/id_000090,src_000023,time_32133122,execs_152343,op_quick,pos_102.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, messag : "math\\abs"); diff --git a/tests/fuzzed/id_000091,sig_06,src_000055,time_5842975,execs_41125,op_flip32,pos_317.buzz b/tests/fuzzed/id_000091,sig_06,src_000055,time_5842975,execs_41125,op_flip32,pos_317.buzz index 2ef1f40b..6642b699 100644 --- a/tests/fuzzed/id_000091,sig_06,src_000055,time_5842975,execs_41125,op_flip32,pos_317.buzz +++ b/tests/fuzzed/id_000091,sig_06,src_000055,time_5842975,execs_41125,op_flip32,pos_317.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000091,src_000031,time_35333046,execs_158378,op_quick,pos_73,val_+2.buzz b/tests/fuzzed/id_000091,src_000031,time_35333046,execs_158378,op_quick,pos_73,val_+2.buzz index d12ff3ef..43dd60fc 100644 --- a/tests/fuzzed/id_000091,src_000031,time_35333046,execs_158378,op_quick,pos_73,val_+2.buzz +++ b/tests/fuzzed/id_000091,src_000031,time_35333046,execs_158378,op_quick,pos_73,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/fuzzed/id_000092,sig_06,src_000055,time_6020917,execs_41990,op_arith8,pos_112,val_-3.buzz b/tests/fuzzed/id_000092,sig_06,src_000055,time_6020917,execs_41990,op_arith8,pos_112,val_-3.buzz index 05da069d..59bd78da 100644 --- a/tests/fuzzed/id_000092,sig_06,src_000055,time_6020917,execs_41990,op_arith8,pos_112,val_-3.buzz +++ b/tests/fuzzed/id_000092,sig_06,src_000055,time_6020917,execs_41990,op_arith8,pos_112,val_-3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000092,src_000017,time_36126521,execs_162046,op_quick,pos_175,val_+2.buzz b/tests/fuzzed/id_000092,src_000017,time_36126521,execs_162046,op_quick,pos_175,val_+2.buzz index ad201cf1..9f7e4aa6 100644 --- a/tests/fuzzed/id_000092,src_000017,time_36126521,execs_162046,op_quick,pos_175,val_+2.buzz +++ b/tests/fuzzed/id_000092,src_000017,time_36126521,execs_162046,op_quick,pos_175,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000093,sig_06,src_000055,time_6029262,execs_42028,op_arith8,pos_112,val_+27.buzz b/tests/fuzzed/id_000093,sig_06,src_000055,time_6029262,execs_42028,op_arith8,pos_112,val_+27.buzz index 842dcad2..1e051ca2 100644 --- a/tests/fuzzed/id_000093,sig_06,src_000055,time_6029262,execs_42028,op_arith8,pos_112,val_+27.buzz +++ b/tests/fuzzed/id_000093,sig_06,src_000055,time_6029262,execs_42028,op_arith8,pos_112,val_+27.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000093,src_000017,time_36242131,execs_162494,op_quick,pos_610,val_+2.buzz b/tests/fuzzed/id_000093,src_000017,time_36242131,execs_162494,op_quick,pos_610,val_+2.buzz index 26374963..859cd91e 100644 --- a/tests/fuzzed/id_000093,src_000017,time_36242131,execs_162494,op_quick,pos_610,val_+2.buzz +++ b/tests/fuzzed/id_000093,src_000017,time_36242131,execs_162494,op_quick,pos_610,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000094,sig_06,src_000055,time_6032394,execs_42043,op_arith8,pos_112,val_-35.buzz b/tests/fuzzed/id_000094,sig_06,src_000055,time_6032394,execs_42043,op_arith8,pos_112,val_-35.buzz index 313a9c4c..8dd77856 100644 --- a/tests/fuzzed/id_000094,sig_06,src_000055,time_6032394,execs_42043,op_arith8,pos_112,val_-35.buzz +++ b/tests/fuzzed/id_000094,sig_06,src_000055,time_6032394,execs_42043,op_arith8,pos_112,val_-35.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000094,src_000017,time_36300862,execs_162728,op_quick,pos_819,val_+2.buzz b/tests/fuzzed/id_000094,src_000017,time_36300862,execs_162728,op_quick,pos_819,val_+2.buzz index 6547fd96..3e25ddb2 100644 --- a/tests/fuzzed/id_000094,src_000017,time_36300862,execs_162728,op_quick,pos_819,val_+2.buzz +++ b/tests/fuzzed/id_000094,src_000017,time_36300862,execs_162728,op_quick,pos_819,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000095,sig_06,src_000055,time_6067419,execs_42208,op_arith8,pos_127,val_+34.buzz b/tests/fuzzed/id_000095,sig_06,src_000055,time_6067419,execs_42208,op_arith8,pos_127,val_+34.buzz index 436fa6d8..1b6535c2 100644 --- a/tests/fuzzed/id_000095,sig_06,src_000055,time_6067419,execs_42208,op_arith8,pos_127,val_+34.buzz +++ b/tests/fuzzed/id_000095,sig_06,src_000055,time_6067419,execs_42208,op_arith8,pos_127,val_+34.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000095,src_000017,time_36402844,execs_163118,op_quick,pos_1172,val_+2.buzz b/tests/fuzzed/id_000095,src_000017,time_36402844,execs_163118,op_quick,pos_1172,val_+2.buzz index 64012afb..f7c428cd 100644 --- a/tests/fuzzed/id_000095,src_000017,time_36402844,execs_163118,op_quick,pos_1172,val_+2.buzz +++ b/tests/fuzzed/id_000095,src_000017,time_36402844,execs_163118,op_quick,pos_1172,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000096,sig_06,src_000055,time_6160725,execs_42654,op_arith8,pos_186,val_-34.buzz b/tests/fuzzed/id_000096,sig_06,src_000055,time_6160725,execs_42654,op_arith8,pos_186,val_-34.buzz index c98c161d..b8fbc887 100644 --- a/tests/fuzzed/id_000096,sig_06,src_000055,time_6160725,execs_42654,op_arith8,pos_186,val_-34.buzz +++ b/tests/fuzzed/id_000096,sig_06,src_000055,time_6160725,execs_42654,op_arith8,pos_186,val_-34.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000096,src_000005,time_38028286,execs_169847,op_quick,pos_409,val_+2.buzz b/tests/fuzzed/id_000096,src_000005,time_38028286,execs_169847,op_quick,pos_409,val_+2.buzz index cf06395a..b0acab14 100644 --- a/tests/fuzzed/id_000096,src_000005,time_38028286,execs_169847,op_quick,pos_409,val_+2.buzz +++ b/tests/fuzzed/id_000096,src_000005,time_38028286,execs_169847,op_quick,pos_409,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000097,sig_06,src_000055,time_6505974,execs_44419,op_havoc,rep_3.buzz b/tests/fuzzed/id_000097,sig_06,src_000055,time_6505974,execs_44419,op_havoc,rep_3.buzz index 7974f747..f0270b76 100644 --- a/tests/fuzzed/id_000097,sig_06,src_000055,time_6505974,execs_44419,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000097,sig_06,src_000055,time_6505974,execs_44419,op_havoc,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { dapa: mut {K: V}, diff --git a/tests/fuzzed/id_000097,src_000005,time_38088218,execs_170086,op_quick,pos_635,val_+2.buzz b/tests/fuzzed/id_000097,src_000005,time_38088218,execs_170086,op_quick,pos_635,val_+2.buzz index 5de88984..130a6adb 100644 --- a/tests/fuzzed/id_000097,src_000005,time_38088218,execs_170086,op_quick,pos_635,val_+2.buzz +++ b/tests/fuzzed/id_000097,src_000005,time_38088218,execs_170086,op_quick,pos_635,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000098,sig_06,src_000055,time_6555894,execs_44698,op_havoc,rep_1.buzz b/tests/fuzzed/id_000098,sig_06,src_000055,time_6555894,execs_44698,op_havoc,rep_1.buzz index 0182cbc5..167ef3e6 100644 --- a/tests/fuzzed/id_000098,sig_06,src_000055,time_6555894,execs_44698,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000098,sig_06,src_000055,time_6555894,execs_44698,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000098,src_000005,time_38114550,execs_170187,op_quick,pos_735,val_+2.buzz b/tests/fuzzed/id_000098,src_000005,time_38114550,execs_170187,op_quick,pos_735,val_+2.buzz index 3692dab2..9e67384b 100644 --- a/tests/fuzzed/id_000098,src_000005,time_38114550,execs_170187,op_quick,pos_735,val_+2.buzz +++ b/tests/fuzzed/id_000098,src_000005,time_38114550,execs_170187,op_quick,pos_735,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000099,src_000005,time_38137561,execs_170274,op_quick,pos_821,val_+2.buzz b/tests/fuzzed/id_000099,src_000005,time_38137561,execs_170274,op_quick,pos_821,val_+2.buzz index d853f6a5..e54f9ef9 100644 --- a/tests/fuzzed/id_000099,src_000005,time_38137561,execs_170274,op_quick,pos_821,val_+2.buzz +++ b/tests/fuzzed/id_000099,src_000005,time_38137561,execs_170274,op_quick,pos_821,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000100,sig_06,src_000055,time_6597156,execs_44919,op_havoc,rep_5.buzz b/tests/fuzzed/id_000100,sig_06,src_000055,time_6597156,execs_44919,op_havoc,rep_5.buzz index c00405e4..1c51bf9b 100644 --- a/tests/fuzzed/id_000100,sig_06,src_000055,time_6597156,execs_44919,op_havoc,rep_5.buzz +++ b/tests/fuzzed/id_000100,sig_06,src_000055,time_6597156,execs_44919,op_havoc,rep_5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000100,src_000050,time_38768876,execs_173461,op_quick,pos_103,val_+1.buzz b/tests/fuzzed/id_000100,src_000050,time_38768876,execs_173461,op_quick,pos_103,val_+1.buzz index c265ab69..bc74eb6e 100644 --- a/tests/fuzzed/id_000100,src_000050,time_38768876,execs_173461,op_quick,pos_103,val_+1.buzz +++ b/tests/fuzzed/id_000100,src_000050,time_38768876,execs_173461,op_quick,pos_103,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/fuzzed/id_000101,src_001614,time_48112006,execs_208056,op_quick,pos_1162,val_+2.buzz b/tests/fuzzed/id_000101,src_001614,time_48112006,execs_208056,op_quick,pos_1162,val_+2.buzz index c36f2fda..84121c18 100644 --- a/tests/fuzzed/id_000101,src_001614,time_48112006,execs_208056,op_quick,pos_1162,val_+2.buzz +++ b/tests/fuzzed/id_000101,src_001614,time_48112006,execs_208056,op_quick,pos_1162,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000102,src_000000,time_49080496,execs_212283,op_quick,pos_294,val_+1.buzz b/tests/fuzzed/id_000102,src_000000,time_49080496,execs_212283,op_quick,pos_294,val_+1.buzz index 56cf8768..b2b7727e 100644 --- a/tests/fuzzed/id_000102,src_000000,time_49080496,execs_212283,op_quick,pos_294,val_+1.buzz +++ b/tests/fuzzed/id_000102,src_000000,time_49080496,execs_212283,op_quick,pos_294,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000103,sig_06,src_000055,time_6992140,execs_47011,op_havoc,rep_2.buzz b/tests/fuzzed/id_000103,sig_06,src_000055,time_6992140,execs_47011,op_havoc,rep_2.buzz index 6c4daf9f..9a4137de 100644 --- a/tests/fuzzed/id_000103,sig_06,src_000055,time_6992140,execs_47011,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000103,sig_06,src_000055,time_6992140,execs_47011,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000103,src_001997,time_52393260,execs_226508,op_quick,pos_273,val_+2.buzz b/tests/fuzzed/id_000103,src_001997,time_52393260,execs_226508,op_quick,pos_273,val_+2.buzz index 79b27a77..e61aea71 100644 --- a/tests/fuzzed/id_000103,src_001997,time_52393260,execs_226508,op_quick,pos_273,val_+2.buzz +++ b/tests/fuzzed/id_000103,src_001997,time_52393260,execs_226508,op_quick,pos_273,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000104,sig_06,src_000055,time_7265946,execs_48467,op_havoc,rep_5.buzz b/tests/fuzzed/id_000104,sig_06,src_000055,time_7265946,execs_48467,op_havoc,rep_5.buzz index c2027faa..70b39f69 100644 --- a/tests/fuzzed/id_000104,sig_06,src_000055,time_7265946,execs_48467,op_havoc,rep_5.buzz +++ b/tests/fuzzed/id_000104,sig_06,src_000055,time_7265946,execs_48467,op_havoc,rep_5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000104,src_001997,time_52717851,execs_227633,op_quick,pos_1277,val_+2.buzz b/tests/fuzzed/id_000104,src_001997,time_52717851,execs_227633,op_quick,pos_1277,val_+2.buzz index b982c415..1939ab24 100644 --- a/tests/fuzzed/id_000104,src_001997,time_52717851,execs_227633,op_quick,pos_1277,val_+2.buzz +++ b/tests/fuzzed/id_000104,src_001997,time_52717851,execs_227633,op_quick,pos_1277,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000105,sig_11,src_000055,time_7281766,execs_48549,op_havoc,rep_4.buzz b/tests/fuzzed/id_000105,sig_11,src_000055,time_7281766,execs_48549,op_havoc,rep_4.buzz index 93902076..dd63b0a6 100644 --- a/tests/fuzzed/id_000105,sig_11,src_000055,time_7281766,execs_48549,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000105,sig_11,src_000055,time_7281766,execs_48549,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: V}, diff --git a/tests/fuzzed/id_000105,src_002280,time_53554723,execs_230519,op_quick,pos_269,val_+6.buzz b/tests/fuzzed/id_000105,src_002280,time_53554723,execs_230519,op_quick,pos_269,val_+6.buzz index 36724a4e..d8c62b52 100644 --- a/tests/fuzzed/id_000105,src_002280,time_53554723,execs_230519,op_quick,pos_269,val_+6.buzz +++ b/tests/fuzzed/id_000105,src_002280,time_53554723,execs_230519,op_quick,pos_269,val_+6.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000106,src_002280,time_53853199,execs_231555,op_quick,pos_1280,val_+6.buzz b/tests/fuzzed/id_000106,src_002280,time_53853199,execs_231555,op_quick,pos_1280,val_+6.buzz index 43779148..3bae4561 100644 --- a/tests/fuzzed/id_000106,src_002280,time_53853199,execs_231555,op_quick,pos_1280,val_+6.buzz +++ b/tests/fuzzed/id_000106,src_002280,time_53853199,execs_231555,op_quick,pos_1280,val_+6.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000107,src_002251,time_56162737,execs_243769,op_quick,pos_192,val_+3.buzz b/tests/fuzzed/id_000107,src_002251,time_56162737,execs_243769,op_quick,pos_192,val_+3.buzz index 9dd1af13..807199ac 100644 --- a/tests/fuzzed/id_000107,src_002251,time_56162737,execs_243769,op_quick,pos_192,val_+3.buzz +++ b/tests/fuzzed/id_000107,src_002251,time_56162737,execs_243769,op_quick,pos_192,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000108,src_000737,time_57203088,execs_248698,op_quick,pos_489,val_+2.buzz b/tests/fuzzed/id_000108,src_000737,time_57203088,execs_248698,op_quick,pos_489,val_+2.buzz index b4e4f55e..cc74db82 100644 --- a/tests/fuzzed/id_000108,src_000737,time_57203088,execs_248698,op_quick,pos_489,val_+2.buzz +++ b/tests/fuzzed/id_000108,src_000737,time_57203088,execs_248698,op_quick,pos_489,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000109,src_000032,time_57809166,execs_251158,op_quick,pos_453,val_+5.buzz b/tests/fuzzed/id_000109,src_000032,time_57809166,execs_251158,op_quick,pos_453,val_+5.buzz index 183446c0..6687efa0 100644 --- a/tests/fuzzed/id_000109,src_000032,time_57809166,execs_251158,op_quick,pos_453,val_+5.buzz +++ b/tests/fuzzed/id_000109,src_000032,time_57809166,execs_251158,op_quick,pos_453,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000110,src_000032,time_57862230,execs_251363,op_quick,pos_633,val_+5.buzz b/tests/fuzzed/id_000110,src_000032,time_57862230,execs_251363,op_quick,pos_633,val_+5.buzz index 3acdfefa..912aaba6 100644 --- a/tests/fuzzed/id_000110,src_000032,time_57862230,execs_251363,op_quick,pos_633,val_+5.buzz +++ b/tests/fuzzed/id_000110,src_000032,time_57862230,execs_251363,op_quick,pos_633,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000111,src_000032,time_57910553,execs_251551,op_quick,pos_796,val_+5.buzz b/tests/fuzzed/id_000111,src_000032,time_57910553,execs_251551,op_quick,pos_796,val_+5.buzz index 0bdc3eb9..ec7e9627 100644 --- a/tests/fuzzed/id_000111,src_000032,time_57910553,execs_251551,op_quick,pos_796,val_+5.buzz +++ b/tests/fuzzed/id_000111,src_000032,time_57910553,execs_251551,op_quick,pos_796,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000112,src_000032,time_57996622,execs_251899,op_quick,pos_1035,val_+5.buzz b/tests/fuzzed/id_000112,src_000032,time_57996622,execs_251899,op_quick,pos_1035,val_+5.buzz index 33439e8b..1f108e9a 100644 --- a/tests/fuzzed/id_000112,src_000032,time_57996622,execs_251899,op_quick,pos_1035,val_+5.buzz +++ b/tests/fuzzed/id_000112,src_000032,time_57996622,execs_251899,op_quick,pos_1035,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000113,src_000032,time_58155815,execs_252532,op_quick,pos_1583,val_+5.buzz b/tests/fuzzed/id_000113,src_000032,time_58155815,execs_252532,op_quick,pos_1583,val_+5.buzz index 81dcbf50..76e17a18 100644 --- a/tests/fuzzed/id_000113,src_000032,time_58155815,execs_252532,op_quick,pos_1583,val_+5.buzz +++ b/tests/fuzzed/id_000113,src_000032,time_58155815,execs_252532,op_quick,pos_1583,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000114,src_000032,time_58557878,execs_254103,op_havoc,rep_3.buzz b/tests/fuzzed/id_000114,src_000032,time_58557878,execs_254103,op_havoc,rep_3.buzz index 571d3b4b..6ef9389a 100644 --- a/tests/fuzzed/id_000114,src_000032,time_58557878,execs_254103,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000114,src_000032,time_58557878,execs_254103,op_havoc,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000115,src_000032,time_58726876,execs_254838,op_havoc,rep_2.buzz b/tests/fuzzed/id_000115,src_000032,time_58726876,execs_254838,op_havoc,rep_2.buzz index be60483b..3379bc28 100644 --- a/tests/fuzzed/id_000115,src_000032,time_58726876,execs_254838,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000115,src_000032,time_58726876,execs_254838,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000116,src_002424,time_61625154,execs_266652,op_quick,pos_963,val_+7.buzz b/tests/fuzzed/id_000116,src_002424,time_61625154,execs_266652,op_quick,pos_963,val_+7.buzz index 9b3acd63..ec1d198e 100644 --- a/tests/fuzzed/id_000116,src_002424,time_61625154,execs_266652,op_quick,pos_963,val_+7.buzz +++ b/tests/fuzzed/id_000116,src_002424,time_61625154,execs_266652,op_quick,pos_963,val_+7.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > vwid !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000117,sig_06,src_000025,time_9269834,execs_61432,op_havoc,rep_1.buzz b/tests/fuzzed/id_000117,sig_06,src_000025,time_9269834,execs_61432,op_havoc,rep_1.buzz index ac73bddf..1e4e1460 100644 --- a/tests/fuzzed/id_000117,sig_06,src_000025,time_9269834,execs_61432,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000117,sig_06,src_000025,time_9269834,execs_61432,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000118,sig_06,src_000025,time_9918752,execs_64030,op_havoc,rep_2.buzz b/tests/fuzzed/id_000118,sig_06,src_000025,time_9918752,execs_64030,op_havoc,rep_2.buzz index 714233ec..aed3a357 100644 --- a/tests/fuzzed/id_000118,sig_06,src_000025,time_9918752,execs_64030,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000118,sig_06,src_000025,time_9918752,execs_64030,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000118,src_000002,time_63625401,execs_275620,op_quick,pos_82.buzz b/tests/fuzzed/id_000118,src_000002,time_63625401,execs_275620,op_quick,pos_82.buzz index bd293d20..a8e70598 100644 --- a/tests/fuzzed/id_000118,src_000002,time_63625401,execs_275620,op_quick,pos_82.buzz +++ b/tests/fuzzed/id_000118,src_000002,time_63625401,execs_275620,op_quick,pos_82.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000119,sig_06,src_000025,time_9949208,execs_64155,op_havoc,rep_1.buzz b/tests/fuzzed/id_000119,sig_06,src_000025,time_9949208,execs_64155,op_havoc,rep_1.buzz index 6a219c2e..fc5452fa 100644 --- a/tests/fuzzed/id_000119,sig_06,src_000025,time_9949208,execs_64155,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000119,sig_06,src_000025,time_9949208,execs_64155,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "str subscript" { std\assert("hello world"[1] == "e", message: "str subscript"); diff --git a/tests/fuzzed/id_000119,src_000002,time_63664836,execs_275795,op_quick,pos_256.buzz b/tests/fuzzed/id_000119,src_000002,time_63664836,execs_275795,op_quick,pos_256.buzz index d2b8cfb9..6cec4d54 100644 --- a/tests/fuzzed/id_000119,src_000002,time_63664836,execs_275795,op_quick,pos_256.buzz +++ b/tests/fuzzed/id_000119,src_000002,time_63664836,execs_275795,op_quick,pos_256.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000120,sig_06,src_000033,time_10618133,execs_65391,op_quick,pos_34.buzz b/tests/fuzzed/id_000120,sig_06,src_000033,time_10618133,execs_65391,op_quick,pos_34.buzz index ff095d0a..8009d441 100644 --- a/tests/fuzzed/id_000120,sig_06,src_000033,time_10618133,execs_65391,op_quick,pos_34.buzz +++ b/tests/fuzzed/id_000120,sig_06,src_000033,time_10618133,execs_65391,op_quick,pos_34.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _ +import "buzz:std"; +import "buzz:buffer" as _ test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000120,src_000002,time_63692320,execs_275913,op_quick,pos_373.buzz b/tests/fuzzed/id_000120,src_000002,time_63692320,execs_275913,op_quick,pos_373.buzz index c68c852f..61084c4d 100644 --- a/tests/fuzzed/id_000120,src_000002,time_63692320,execs_275913,op_quick,pos_373.buzz +++ b/tests/fuzzed/id_000120,src_000002,time_63692320,execs_275913,op_quick,pos_373.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000121,sig_06,src_000033,time_10729928,execs_65545,op_quick,pos_125.buzz b/tests/fuzzed/id_000121,sig_06,src_000033,time_10729928,execs_65545,op_quick,pos_125.buzz index 604b10f3..f8ee7261 100644 --- a/tests/fuzzed/id_000121,sig_06,src_000033,time_10729928,execs_65545,op_quick,pos_125.buzz +++ b/tests/fuzzed/id_000121,sig_06,src_000033,time_10729928,execs_65545,op_quick,pos_125.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000121,src_000002,time_63795623,execs_276360,op_quick,pos_807.buzz b/tests/fuzzed/id_000121,src_000002,time_63795623,execs_276360,op_quick,pos_807.buzz index 590fba86..0e837954 100644 --- a/tests/fuzzed/id_000121,src_000002,time_63795623,execs_276360,op_quick,pos_807.buzz +++ b/tests/fuzzed/id_000121,src_000002,time_63795623,execs_276360,op_quick,pos_807.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000122,sig_06,src_000033,time_10730659,execs_65546,op_quick,pos_126.buzz b/tests/fuzzed/id_000122,sig_06,src_000033,time_10730659,execs_65546,op_quick,pos_126.buzz index 37733f8b..84aa573c 100644 --- a/tests/fuzzed/id_000122,sig_06,src_000033,time_10730659,execs_65546,op_quick,pos_126.buzz +++ b/tests/fuzzed/id_000122,sig_06,src_000033,time_10730659,execs_65546,op_quick,pos_126.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000122,src_000002,time_63896430,execs_276799,op_quick,pos_1161.buzz b/tests/fuzzed/id_000122,src_000002,time_63896430,execs_276799,op_quick,pos_1161.buzz index 937e8099..2a8c81be 100644 --- a/tests/fuzzed/id_000122,src_000002,time_63896430,execs_276799,op_quick,pos_1161.buzz +++ b/tests/fuzzed/id_000122,src_000002,time_63896430,execs_276799,op_quick,pos_1161.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000123,sig_06,src_000033,time_10733578,execs_65550,op_quick,pos_130.buzz b/tests/fuzzed/id_000123,sig_06,src_000033,time_10733578,execs_65550,op_quick,pos_130.buzz index 104db1db..2063ce4d 100644 --- a/tests/fuzzed/id_000123,sig_06,src_000033,time_10733578,execs_65550,op_quick,pos_130.buzz +++ b/tests/fuzzed/id_000123,sig_06,src_000033,time_10733578,execs_65550,op_quick,pos_130.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000123,src_000053,time_66971371,execs_290741,op_quick,pos_239.buzz b/tests/fuzzed/id_000123,src_000053,time_66971371,execs_290741,op_quick,pos_239.buzz index 70ec51f5..0aa0f420 100644 --- a/tests/fuzzed/id_000123,src_000053,time_66971371,execs_290741,op_quick,pos_239.buzz +++ b/tests/fuzzed/id_000123,src_000053,time_66971371,execs_290741,op_quick,pos_239.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { if (false) { diff --git a/tests/fuzzed/id_000124,sig_06,src_000033,time_10771649,execs_65599,op_quick,pos_167.buzz b/tests/fuzzed/id_000124,sig_06,src_000033,time_10771649,execs_65599,op_quick,pos_167.buzz index fe043384..469b7946 100644 --- a/tests/fuzzed/id_000124,sig_06,src_000033,time_10771649,execs_65599,op_quick,pos_167.buzz +++ b/tests/fuzzed/id_000124,sig_06,src_000033,time_10771649,execs_65599,op_quick,pos_167.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000124,src_000053,time_66996461,execs_290854,op_quick,pos_339.buzz b/tests/fuzzed/id_000124,src_000053,time_66996461,execs_290854,op_quick,pos_339.buzz index 40141e43..b18f3a17 100644 --- a/tests/fuzzed/id_000124,src_000053,time_66996461,execs_290854,op_quick,pos_339.buzz +++ b/tests/fuzzed/id_000124,src_000053,time_66996461,execs_290854,op_quick,pos_339.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { if (false) { diff --git a/tests/fuzzed/id_000125,sig_06,src_000033,time_10878938,execs_65728,op_quick,pos_200.buzz b/tests/fuzzed/id_000125,sig_06,src_000033,time_10878938,execs_65728,op_quick,pos_200.buzz index a8840c4f..948e2304 100644 --- a/tests/fuzzed/id_000125,sig_06,src_000033,time_10878938,execs_65728,op_quick,pos_200.buzz +++ b/tests/fuzzed/id_000125,sig_06,src_000033,time_10878938,execs_65728,op_quick,pos_200.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000125,src_000039,time_68732463,execs_299979,op_quick,pos_199.buzz b/tests/fuzzed/id_000125,src_000039,time_68732463,execs_299979,op_quick,pos_199.buzz index 6adde6dd..2b015e2d 100644 --- a/tests/fuzzed/id_000125,src_000039,time_68732463,execs_299979,op_quick,pos_199.buzz +++ b/tests/fuzzed/id_000125,src_000039,time_68732463,execs_299979,op_quick,pos_199.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000126,sig_06,src_000033,time_10930657,execs_65798,op_quick,pos_234.buzz b/tests/fuzzed/id_000126,sig_06,src_000033,time_10930657,execs_65798,op_quick,pos_234.buzz index a5e477b9..f2dc14cf 100644 --- a/tests/fuzzed/id_000126,sig_06,src_000033,time_10930657,execs_65798,op_quick,pos_234.buzz +++ b/tests/fuzzed/id_000126,sig_06,src_000033,time_10930657,execs_65798,op_quick,pos_234.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000126,src_000039,time_68819907,execs_300356,op_quick,pos_575.buzz b/tests/fuzzed/id_000126,src_000039,time_68819907,execs_300356,op_quick,pos_575.buzz index 3ffd1bc2..600d70fe 100644 --- a/tests/fuzzed/id_000126,src_000039,time_68819907,execs_300356,op_quick,pos_575.buzz +++ b/tests/fuzzed/id_000126,src_000039,time_68819907,execs_300356,op_quick,pos_575.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000127,sig_06,src_000033,time_11132540,execs_66081,op_flip1,pos_105.buzz b/tests/fuzzed/id_000127,sig_06,src_000033,time_11132540,execs_66081,op_flip1,pos_105.buzz index 70db7c78..f8054ca9 100644 --- a/tests/fuzzed/id_000127,sig_06,src_000033,time_11132540,execs_66081,op_flip1,pos_105.buzz +++ b/tests/fuzzed/id_000127,sig_06,src_000033,time_11132540,execs_66081,op_flip1,pos_105.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.iNit(); diff --git a/tests/fuzzed/id_000127,src_000039,time_68869489,execs_300560,op_quick,pos_778.buzz b/tests/fuzzed/id_000127,src_000039,time_68869489,execs_300560,op_quick,pos_778.buzz index d1c89277..da4cc08e 100644 --- a/tests/fuzzed/id_000127,src_000039,time_68869489,execs_300560,op_quick,pos_778.buzz +++ b/tests/fuzzed/id_000127,src_000039,time_68869489,execs_300560,op_quick,pos_778.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000128,sig_06,src_000042,time_12674554,execs_68759,op_inf,rep_2.buzz b/tests/fuzzed/id_000128,sig_06,src_000042,time_12674554,execs_68759,op_inf,rep_2.buzz index d35880ac..f5654f67 100644 --- a/tests/fuzzed/id_000128,sig_06,src_000042,time_12674554,execs_68759,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000128,sig_06,src_000042,time_12674554,execs_68759,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000128,src_000039,time_68913805,execs_300733,op_quick,pos_938.buzz b/tests/fuzzed/id_000128,src_000039,time_68913805,execs_300733,op_quick,pos_938.buzz index f9553e81..1ebd23a2 100644 --- a/tests/fuzzed/id_000128,src_000039,time_68913805,execs_300733,op_quick,pos_938.buzz +++ b/tests/fuzzed/id_000128,src_000039,time_68913805,execs_300733,op_quick,pos_938.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000129,sig_06,src_000042,time_12674783,execs_68760,op_inf,rep_2.buzz b/tests/fuzzed/id_000129,sig_06,src_000042,time_12674783,execs_68760,op_inf,rep_2.buzz index a0851f94..4ecea77d 100644 --- a/tests/fuzzed/id_000129,sig_06,src_000042,time_12674783,execs_68760,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000129,sig_06,src_000042,time_12674783,execs_68760,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000129,src_000039,time_69011117,execs_301126,op_quick,pos_1318.buzz b/tests/fuzzed/id_000129,src_000039,time_69011117,execs_301126,op_quick,pos_1318.buzz index 2e5513fa..c5171ee3 100644 --- a/tests/fuzzed/id_000129,src_000039,time_69011117,execs_301126,op_quick,pos_1318.buzz +++ b/tests/fuzzed/id_000129,src_000039,time_69011117,execs_301126,op_quick,pos_1318.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000130,sig_06,src_000042,time_12675014,execs_68761,op_inf,rep_2.buzz b/tests/fuzzed/id_000130,sig_06,src_000042,time_12675014,execs_68761,op_inf,rep_2.buzz index 84de51a3..d4d0a88e 100644 --- a/tests/fuzzed/id_000130,sig_06,src_000042,time_12675014,execs_68761,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000130,sig_06,src_000042,time_12675014,execs_68761,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000130,src_000057,time_72625976,execs_316629,op_quick,pos_187.buzz b/tests/fuzzed/id_000130,src_000057,time_72625976,execs_316629,op_quick,pos_187.buzz index 10f48661..4b72038b 100644 --- a/tests/fuzzed/id_000130,src_000057,time_72625976,execs_316629,op_quick,pos_187.buzz +++ b/tests/fuzzed/id_000130,src_000057,time_72625976,execs_316629,op_quick,pos_187.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "block expression" { final value = from { diff --git a/tests/fuzzed/id_000131,sig_06,src_000042,time_12691268,execs_68827,op_inf,rep_2.buzz b/tests/fuzzed/id_000131,sig_06,src_000042,time_12691268,execs_68827,op_inf,rep_2.buzz index 36610ace..794b133f 100644 --- a/tests/fuzzed/id_000131,sig_06,src_000042,time_12691268,execs_68827,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000131,sig_06,src_000042,time_12691268,execs_68827,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000132,sig_06,src_000042,time_12838977,execs_69470,op_quick,pos_224.buzz b/tests/fuzzed/id_000132,sig_06,src_000042,time_12838977,execs_69470,op_quick,pos_224.buzz index 494e88cc..76dbb254 100644 --- a/tests/fuzzed/id_000132,sig_06,src_000042,time_12838977,execs_69470,op_quick,pos_224.buzz +++ b/tests/fuzzed/id_000132,sig_06,src_000042,time_12838977,execs_69470,op_quick,pos_224.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000132,src_000040,time_74481265,execs_324476,op_quick,pos_139.buzz b/tests/fuzzed/id_000132,src_000040,time_74481265,execs_324476,op_quick,pos_139.buzz index a8ba9d90..3c46d973 100644 --- a/tests/fuzzed/id_000132,src_000040,time_74481265,execs_324476,op_quick,pos_139.buzz +++ b/tests/fuzzed/id_000132,src_000040,time_74481265,execs_324476,op_quick,pos_139.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "If arrow" { final opt: int? = null; diff --git a/tests/fuzzed/id_000133,sig_06,src_000042,time_12877414,execs_69638,op_quick,pos_289.buzz b/tests/fuzzed/id_000133,sig_06,src_000042,time_12877414,execs_69638,op_quick,pos_289.buzz index 154cbf4e..a90e1658 100644 --- a/tests/fuzzed/id_000133,sig_06,src_000042,time_12877414,execs_69638,op_quick,pos_289.buzz +++ b/tests/fuzzed/id_000133,sig_06,src_000042,time_12877414,execs_69638,op_quick,pos_289.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000133,src_000040,time_74505122,execs_324579,op_quick,pos_241.buzz b/tests/fuzzed/id_000133,src_000040,time_74505122,execs_324579,op_quick,pos_241.buzz index 24d51f77..31937b88 100644 --- a/tests/fuzzed/id_000133,src_000040,time_74505122,execs_324579,op_quick,pos_241.buzz +++ b/tests/fuzzed/id_000133,src_000040,time_74505122,execs_324579,op_quick,pos_241.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "If arrow" { final opt: int? = null; diff --git a/tests/fuzzed/id_000134,sig_06,src_000042,time_13102189,execs_70564,op_quick,pos_986.buzz b/tests/fuzzed/id_000134,sig_06,src_000042,time_13102189,execs_70564,op_quick,pos_986.buzz index 035e89c6..55689021 100644 --- a/tests/fuzzed/id_000134,sig_06,src_000042,time_13102189,execs_70564,op_quick,pos_986.buzz +++ b/tests/fuzzed/id_000134,sig_06,src_000042,time_13102189,execs_70564,op_quick,pos_986.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000134,src_002271,time_75747279,execs_329773,op_quick,pos_272.buzz b/tests/fuzzed/id_000134,src_002271,time_75747279,execs_329773,op_quick,pos_272.buzz index 449b106d..69022f99 100644 --- a/tests/fuzzed/id_000134,src_002271,time_75747279,execs_329773,op_quick,pos_272.buzz +++ b/tests/fuzzed/id_000134,src_002271,time_75747279,execs_329773,op_quick,pos_272.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000135,sig_11,src_000042,time_13150009,execs_70758,op_quick,pos_1084.buzz b/tests/fuzzed/id_000135,sig_11,src_000042,time_13150009,execs_70758,op_quick,pos_1084.buzz index 807254e6..babc1e44 100644 --- a/tests/fuzzed/id_000135,sig_11,src_000042,time_13150009,execs_70758,op_quick,pos_1084.buzz +++ b/tests/fuzzed/id_000135,sig_11,src_000042,time_13150009,execs_70758,op_quick,pos_1084.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000135,src_002271,time_76064205,execs_330797,op_quick,pos_1283.buzz b/tests/fuzzed/id_000135,src_002271,time_76064205,execs_330797,op_quick,pos_1283.buzz index 57b9f79b..f5c4d0d5 100644 --- a/tests/fuzzed/id_000135,src_002271,time_76064205,execs_330797,op_quick,pos_1283.buzz +++ b/tests/fuzzed/id_000135,src_002271,time_76064205,execs_330797,op_quick,pos_1283.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000136,sig_06,src_000042,time_13234094,execs_71080,op_quick,pos_1309.buzz b/tests/fuzzed/id_000136,sig_06,src_000042,time_13234094,execs_71080,op_quick,pos_1309.buzz index d897c5d0..c62cbd70 100644 --- a/tests/fuzzed/id_000136,sig_06,src_000042,time_13234094,execs_71080,op_quick,pos_1309.buzz +++ b/tests/fuzzed/id_000136,sig_06,src_000042,time_13234094,execs_71080,op_quick,pos_1309.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000136,src_000012,time_84717279,execs_364061,op_quick,pos_179.buzz b/tests/fuzzed/id_000136,src_000012,time_84717279,execs_364061,op_quick,pos_179.buzz index 2d47511d..f84cd8dc 100644 --- a/tests/fuzzed/id_000136,src_000012,time_84717279,execs_364061,op_quick,pos_179.buzz +++ b/tests/fuzzed/id_000136,src_000012,time_84717279,execs_364061,op_quick,pos_179.buzz @@ -1,4 +1,4 @@ -import "tests/utils/testing" as testing; +import "../utils/testing" as testing; final mine = 42; diff --git a/tests/fuzzed/id_000137,sig_06,src_000042,time_13422798,execs_71869,op_flip1,pos_1110.buzz b/tests/fuzzed/id_000137,sig_06,src_000042,time_13422798,execs_71869,op_flip1,pos_1110.buzz index 95c49500..e4f4af79 100644 --- a/tests/fuzzed/id_000137,sig_06,src_000042,time_13422798,execs_71869,op_flip1,pos_1110.buzz +++ b/tests/fuzzed/id_000137,sig_06,src_000042,time_13422798,execs_71869,op_flip1,pos_1110.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000137,src_000058,time_84933133,execs_364998,op_quick,pos_335.buzz b/tests/fuzzed/id_000137,src_000058,time_84933133,execs_364998,op_quick,pos_335.buzz index 398daf1a..ffd56bc1 100644 --- a/tests/fuzzed/id_000137,src_000058,time_84933133,execs_364998,op_quick,pos_335.buzz +++ b/tests/fuzzed/id_000137,src_000058,time_84933133,execs_364998,op_quick,pos_335.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun mul(a: int, b: int) > int { return a * b; diff --git a/tests/fuzzed/id_000138,sig_06,src_000042,time_13424527,execs_71876,op_flip1,pos_1112.buzz b/tests/fuzzed/id_000138,sig_06,src_000042,time_13424527,execs_71876,op_flip1,pos_1112.buzz index 97704fdc..10820633 100644 --- a/tests/fuzzed/id_000138,sig_06,src_000042,time_13424527,execs_71876,op_flip1,pos_1112.buzz +++ b/tests/fuzzed/id_000138,sig_06,src_000042,time_13424527,execs_71876,op_flip1,pos_1112.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000138,src_000016,time_89300118,execs_384604,op_quick,pos_148.buzz b/tests/fuzzed/id_000138,src_000016,time_89300118,execs_384604,op_quick,pos_148.buzz index 3b6e34bb..183b7179 100644 --- a/tests/fuzzed/id_000138,src_000016,time_89300118,execs_384604,op_quick,pos_148.buzz +++ b/tests/fuzzed/id_000138,src_000016,time_89300118,execs_384604,op_quick,pos_148.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "for loop" { var sum = 0; diff --git a/tests/fuzzed/id_000139,sig_06,src_000042,time_13700952,execs_73041,op_havoc,rep_2.buzz b/tests/fuzzed/id_000139,sig_06,src_000042,time_13700952,execs_73041,op_havoc,rep_2.buzz index a57c01f6..bb66d90a 100644 --- a/tests/fuzzed/id_000139,sig_06,src_000042,time_13700952,execs_73041,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000139,sig_06,src_000042,time_13700952,execs_73041,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000139,src_000016,time_89357369,execs_384854,op_quick,pos_385.buzz b/tests/fuzzed/id_000139,src_000016,time_89357369,execs_384854,op_quick,pos_385.buzz index 09a8e8dc..28c97680 100644 --- a/tests/fuzzed/id_000139,src_000016,time_89357369,execs_384854,op_quick,pos_385.buzz +++ b/tests/fuzzed/id_000139,src_000016,time_89357369,execs_384854,op_quick,pos_385.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "for loop" { var sum = 0; diff --git a/tests/fuzzed/id_000140,sig_06,src_000042,time_13733874,execs_73181,op_havoc,rep_1.buzz b/tests/fuzzed/id_000140,sig_06,src_000042,time_13733874,execs_73181,op_havoc,rep_1.buzz index 8dcfae99..f7de6995 100644 --- a/tests/fuzzed/id_000140,sig_06,src_000042,time_13733874,execs_73181,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000140,sig_06,src_000042,time_13733874,execs_73181,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000140,src_001946,time_92042894,execs_396343,op_quick,pos_271.buzz b/tests/fuzzed/id_000140,src_001946,time_92042894,execs_396343,op_quick,pos_271.buzz index 28f812e9..398aff6c 100644 --- a/tests/fuzzed/id_000140,src_001946,time_92042894,execs_396343,op_quick,pos_271.buzz +++ b/tests/fuzzed/id_000140,src_001946,time_92042894,execs_396343,op_quick,pos_271.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000141,src_002252,time_93070185,execs_400582,op_quick,pos_188.buzz b/tests/fuzzed/id_000141,src_002252,time_93070185,execs_400582,op_quick,pos_188.buzz index 5b1e41fd..20df91d5 100644 --- a/tests/fuzzed/id_000141,src_002252,time_93070185,execs_400582,op_quick,pos_188.buzz +++ b/tests/fuzzed/id_000141,src_002252,time_93070185,execs_400582,op_quick,pos_188.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello w"; diff --git a/tests/fuzzed/id_000142,sig_06,src_000042,time_13838964,execs_73616,op_havoc,rep_1.buzz b/tests/fuzzed/id_000142,sig_06,src_000042,time_13838964,execs_73616,op_havoc,rep_1.buzz index b403d9c7..6985bdfa 100644 --- a/tests/fuzzed/id_000142,sig_06,src_000042,time_13838964,execs_73616,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000142,sig_06,src_000042,time_13838964,execs_73616,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000142,src_002528,time_94883913,execs_411509,op_quick,pos_275.buzz b/tests/fuzzed/id_000142,src_002528,time_94883913,execs_411509,op_quick,pos_275.buzz index c8934328..8e8eda16 100644 --- a/tests/fuzzed/id_000142,src_002528,time_94883913,execs_411509,op_quick,pos_275.buzz +++ b/tests/fuzzed/id_000142,src_002528,time_94883913,execs_411509,op_quick,pos_275.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000143,sig_06,src_000042,time_13845124,execs_73643,op_havoc,rep_2.buzz b/tests/fuzzed/id_000143,sig_06,src_000042,time_13845124,execs_73643,op_havoc,rep_2.buzz index 5ce55474..427f120a 100644 --- a/tests/fuzzed/id_000143,sig_06,src_000042,time_13845124,execs_73643,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000143,sig_06,src_000042,time_13845124,execs_73643,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000143,src_000755,time_98888502,execs_427842,op_quick,pos_486.buzz b/tests/fuzzed/id_000143,src_000755,time_98888502,execs_427842,op_quick,pos_486.buzz index 5623da47..31caff99 100644 --- a/tests/fuzzed/id_000143,src_000755,time_98888502,execs_427842,op_quick,pos_486.buzz +++ b/tests/fuzzed/id_000143,src_000755,time_98888502,execs_427842,op_quick,pos_486.buzz @@ -1,5 +1,5 @@ import "Std"; -import "gc"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000144,sig_06,src_000042,time_14025464,execs_74393,op_havoc,rep_2.buzz b/tests/fuzzed/id_000144,sig_06,src_000042,time_14025464,execs_74393,op_havoc,rep_2.buzz index 38d606ea..0c555cfd 100644 --- a/tests/fuzzed/id_000144,sig_06,src_000042,time_14025464,execs_74393,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000144,sig_06,src_000042,time_14025464,execs_74393,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000144,src_001522,time_103858379,execs_448821,op_quick,pos_424.buzz b/tests/fuzzed/id_000144,src_001522,time_103858379,execs_448821,op_quick,pos_424.buzz index 9745c968..c5832013 100644 --- a/tests/fuzzed/id_000144,src_001522,time_103858379,execs_448821,op_quick,pos_424.buzz +++ b/tests/fuzzed/id_000144,src_001522,time_103858379,execs_448821,op_quick,pos_424.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000145,sig_06,src_000042,time_14121826,execs_74794,op_havoc,rep_1.buzz b/tests/fuzzed/id_000145,sig_06,src_000042,time_14121826,execs_74794,op_havoc,rep_1.buzz index 25ae08dc..4b78bb5e 100644 --- a/tests/fuzzed/id_000145,sig_06,src_000042,time_14121826,execs_74794,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000145,sig_06,src_000042,time_14121826,execs_74794,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000145,src_000038,time_104657823,execs_451929,op_quick,pos_213.buzz b/tests/fuzzed/id_000145,src_000038,time_104657823,execs_451929,op_quick,pos_213.buzz index 925196c0..751d1134 100644 --- a/tests/fuzzed/id_000145,src_000038,time_104657823,execs_451929,op_quick,pos_213.buzz +++ b/tests/fuzzed/id_000145,src_000038,time_104657823,execs_451929,op_quick,pos_213.buzz @@ -1,6 +1,6 @@ -import "std"; -import "tests/utils/import-b"; -import "tests/utils/import-a"; +import "buzz:std"; +import "../utils/import-b"; +import "../utils/import-a"; test "Mutual import" { std\print("t: {a\Hello}"); diff --git a/tests/fuzzed/id_000146,sig_06,src_000042,time_14463265,execs_76249,op_havoc,rep_2.buzz b/tests/fuzzed/id_000146,sig_06,src_000042,time_14463265,execs_76249,op_havoc,rep_2.buzz index 5f85f0d5..1cc92b72 100644 --- a/tests/fuzzed/id_000146,sig_06,src_000042,time_14463265,execs_76249,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000146,sig_06,src_000042,time_14463265,execs_76249,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000146,src_002286,time_112146080,execs_481926,op_quick,pos_276.buzz b/tests/fuzzed/id_000146,src_002286,time_112146080,execs_481926,op_quick,pos_276.buzz index 813a678a..644f3ca8 100644 --- a/tests/fuzzed/id_000146,src_002286,time_112146080,execs_481926,op_quick,pos_276.buzz +++ b/tests/fuzzed/id_000146,src_002286,time_112146080,execs_481926,op_quick,pos_276.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000147,sig_11,src_001346,time_15760059,execs_81806,op_quick,pos_1085,val_+1.buzz b/tests/fuzzed/id_000147,sig_11,src_001346,time_15760059,execs_81806,op_quick,pos_1085,val_+1.buzz index dbdeb696..cb78d189 100644 --- a/tests/fuzzed/id_000147,sig_11,src_001346,time_15760059,execs_81806,op_quick,pos_1085,val_+1.buzz +++ b/tests/fuzzed/id_000147,sig_11,src_001346,time_15760059,execs_81806,op_quick,pos_1085,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000147,src_002673,time_113015992,execs_485048,op_quick,pos_269.buzz b/tests/fuzzed/id_000147,src_002673,time_113015992,execs_485048,op_quick,pos_269.buzz index 369932a9..a2351121 100644 --- a/tests/fuzzed/id_000147,src_002673,time_113015992,execs_485048,op_quick,pos_269.buzz +++ b/tests/fuzzed/id_000147,src_002673,time_113015992,execs_485048,op_quick,pos_269.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000148,sig_11,src_001346,time_15760548,execs_81808,op_quick,pos_1087,val_+1.buzz b/tests/fuzzed/id_000148,sig_11,src_001346,time_15760548,execs_81808,op_quick,pos_1087,val_+1.buzz index 730663c0..9b8e2652 100644 --- a/tests/fuzzed/id_000148,sig_11,src_001346,time_15760548,execs_81808,op_quick,pos_1087,val_+1.buzz +++ b/tests/fuzzed/id_000148,sig_11,src_001346,time_15760548,execs_81808,op_quick,pos_1087,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000148,src_002407,time_114577936,execs_491508,op_quick,pos_1564.buzz b/tests/fuzzed/id_000148,src_002407,time_114577936,execs_491508,op_quick,pos_1564.buzz index 7793b49a..c5f90b05 100644 --- a/tests/fuzzed/id_000148,src_002407,time_114577936,execs_491508,op_quick,pos_1564.buzz +++ b/tests/fuzzed/id_000148,src_002407,time_114577936,execs_491508,op_quick,pos_1564.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000149,sig_06,src_000041,time_17182551,execs_87620,op_quick,pos_123,val_+1.buzz b/tests/fuzzed/id_000149,sig_06,src_000041,time_17182551,execs_87620,op_quick,pos_123,val_+1.buzz index 674c7b0b..1b42e17c 100644 --- a/tests/fuzzed/id_000149,sig_06,src_000041,time_17182551,execs_87620,op_quick,pos_123,val_+1.buzz +++ b/tests/fuzzed/id_000149,sig_06,src_000041,time_17182551,execs_87620,op_quick,pos_123,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000149,src_000024,time_120573893,execs_513984,op_quick,pos_242.buzz b/tests/fuzzed/id_000149,src_000024,time_120573893,execs_513984,op_quick,pos_242.buzz index 0dfd6ced..053fca1c 100644 --- a/tests/fuzzed/id_000149,src_000024,time_120573893,execs_513984,op_quick,pos_242.buzz +++ b/tests/fuzzed/id_000149,src_000024,time_120573893,execs_513984,op_quick,pos_242.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000150,sig_06,src_000041,time_17217299,execs_87755,op_quick,pos_209,val_+1.buzz b/tests/fuzzed/id_000150,sig_06,src_000041,time_17217299,execs_87755,op_quick,pos_209,val_+1.buzz index a4d5406d..30e3dee5 100644 --- a/tests/fuzzed/id_000150,sig_06,src_000041,time_17217299,execs_87755,op_quick,pos_209,val_+1.buzz +++ b/tests/fuzzed/id_000150,sig_06,src_000041,time_17217299,execs_87755,op_quick,pos_209,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000150,src_000024,time_120642287,execs_514287,op_quick,pos_520.buzz b/tests/fuzzed/id_000150,src_000024,time_120642287,execs_514287,op_quick,pos_520.buzz index 4d9cb371..8edc2582 100644 --- a/tests/fuzzed/id_000150,src_000024,time_120642287,execs_514287,op_quick,pos_520.buzz +++ b/tests/fuzzed/id_000150,src_000024,time_120642287,execs_514287,op_quick,pos_520.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000151,sig_06,src_000041,time_17229285,execs_87812,op_quick,pos_230,val_+1.buzz b/tests/fuzzed/id_000151,sig_06,src_000041,time_17229285,execs_87812,op_quick,pos_230,val_+1.buzz index c1e34119..1accb5d4 100644 --- a/tests/fuzzed/id_000151,sig_06,src_000041,time_17229285,execs_87812,op_quick,pos_230,val_+1.buzz +++ b/tests/fuzzed/id_000151,sig_06,src_000041,time_17229285,execs_87812,op_quick,pos_230,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000151,src_000024,time_120901995,execs_515417,op_havoc,rep_2.buzz b/tests/fuzzed/id_000151,src_000024,time_120901995,execs_515417,op_havoc,rep_2.buzz index 93ce173c..10aac579 100644 --- a/tests/fuzzed/id_000151,src_000024,time_120901995,execs_515417,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000151,src_000024,time_120901995,execs_515417,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000152,sig_06,src_000041,time_17325009,execs_88181,op_quick,pos_478,val_+1.buzz b/tests/fuzzed/id_000152,sig_06,src_000041,time_17325009,execs_88181,op_quick,pos_478,val_+1.buzz index 05e70db6..c6429ebe 100644 --- a/tests/fuzzed/id_000152,sig_06,src_000041,time_17325009,execs_88181,op_quick,pos_478,val_+1.buzz +++ b/tests/fuzzed/id_000152,sig_06,src_000041,time_17325009,execs_88181,op_quick,pos_478,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000152,src_002620,time_121738515,execs_518760,op_quick,pos_995.buzz b/tests/fuzzed/id_000152,src_002620,time_121738515,execs_518760,op_quick,pos_995.buzz index 4496832c..b1871722 100644 --- a/tests/fuzzed/id_000152,src_002620,time_121738515,execs_518760,op_quick,pos_995.buzz +++ b/tests/fuzzed/id_000152,src_002620,time_121738515,execs_518760,op_quick,pos_995.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000153,sig_06,src_000041,time_17386339,execs_88410,op_quick,pos_659,val_+1.buzz b/tests/fuzzed/id_000153,sig_06,src_000041,time_17386339,execs_88410,op_quick,pos_659,val_+1.buzz index 441558f9..55bd5c0f 100644 --- a/tests/fuzzed/id_000153,sig_06,src_000041,time_17386339,execs_88410,op_quick,pos_659,val_+1.buzz +++ b/tests/fuzzed/id_000153,sig_06,src_000041,time_17386339,execs_88410,op_quick,pos_659,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000153,src_000047,time_124016451,execs_527534,op_quick,pos_98.buzz b/tests/fuzzed/id_000153,src_000047,time_124016451,execs_527534,op_quick,pos_98.buzz index 4101f527..662b4944 100644 --- a/tests/fuzzed/id_000153,src_000047,time_124016451,execs_527534,op_quick,pos_98.buzz +++ b/tests/fuzzed/id_000153,src_000047,time_124016451,execs_527534,op_quick,pos_98.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000154,sig_06,src_000041,time_17416405,execs_88510,op_quick,pos_758,val_+1.buzz b/tests/fuzzed/id_000154,sig_06,src_000041,time_17416405,execs_88510,op_quick,pos_758,val_+1.buzz index b70b7b9f..191079dd 100644 --- a/tests/fuzzed/id_000154,sig_06,src_000041,time_17416405,execs_88510,op_quick,pos_758,val_+1.buzz +++ b/tests/fuzzed/id_000154,sig_06,src_000041,time_17416405,execs_88510,op_quick,pos_758,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000154,src_000047,time_124150367,execs_528099,op_quick,pos_650.buzz b/tests/fuzzed/id_000154,src_000047,time_124150367,execs_528099,op_quick,pos_650.buzz index c5fca7d6..c627588f 100644 --- a/tests/fuzzed/id_000154,src_000047,time_124150367,execs_528099,op_quick,pos_650.buzz +++ b/tests/fuzzed/id_000154,src_000047,time_124150367,execs_528099,op_quick,pos_650.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000155,sig_06,src_000041,time_17534453,execs_88939,op_quick,pos_1103,val_+1.buzz b/tests/fuzzed/id_000155,sig_06,src_000041,time_17534453,execs_88939,op_quick,pos_1103,val_+1.buzz index f4eff236..54faa54a 100644 --- a/tests/fuzzed/id_000155,sig_06,src_000041,time_17534453,execs_88939,op_quick,pos_1103,val_+1.buzz +++ b/tests/fuzzed/id_000155,sig_06,src_000041,time_17534453,execs_88939,op_quick,pos_1103,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000155,src_000036,time_126120097,execs_536761,op_quick,pos_330.buzz b/tests/fuzzed/id_000155,src_000036,time_126120097,execs_536761,op_quick,pos_330.buzz index b9b028ad..192d1f4f 100644 --- a/tests/fuzzed/id_000155,src_000036,time_126120097,execs_536761,op_quick,pos_330.buzz +++ b/tests/fuzzed/id_000155,src_000036,time_126120097,execs_536761,op_quick,pos_330.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000156,sig_06,src_000041,time_17550174,execs_89002,op_quick,pos_1118,val_+1.buzz b/tests/fuzzed/id_000156,sig_06,src_000041,time_17550174,execs_89002,op_quick,pos_1118,val_+1.buzz index e0f4366f..4bde05ec 100644 --- a/tests/fuzzed/id_000156,sig_06,src_000041,time_17550174,execs_89002,op_quick,pos_1118,val_+1.buzz +++ b/tests/fuzzed/id_000156,sig_06,src_000041,time_17550174,execs_89002,op_quick,pos_1118,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000156,src_000036,time_126273407,execs_537385,op_quick,pos_917.buzz b/tests/fuzzed/id_000156,src_000036,time_126273407,execs_537385,op_quick,pos_917.buzz index e6fa27f2..0211aef4 100644 --- a/tests/fuzzed/id_000156,src_000036,time_126273407,execs_537385,op_quick,pos_917.buzz +++ b/tests/fuzzed/id_000156,src_000036,time_126273407,execs_537385,op_quick,pos_917.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000157,sig_06,src_000041,time_17558416,execs_89034,op_quick,pos_1150,val_+1.buzz b/tests/fuzzed/id_000157,sig_06,src_000041,time_17558416,execs_89034,op_quick,pos_1150,val_+1.buzz index 03a747c7..734c29b8 100644 --- a/tests/fuzzed/id_000157,sig_06,src_000041,time_17558416,execs_89034,op_quick,pos_1150,val_+1.buzz +++ b/tests/fuzzed/id_000157,sig_06,src_000041,time_17558416,execs_89034,op_quick,pos_1150,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000157,src_000011,time_132646048,execs_564729,op_quick,pos_144.buzz b/tests/fuzzed/id_000157,src_000011,time_132646048,execs_564729,op_quick,pos_144.buzz index 26913637..aaaca8f4 100644 --- a/tests/fuzzed/id_000157,src_000011,time_132646048,execs_564729,op_quick,pos_144.buzz +++ b/tests/fuzzed/id_000157,src_000011,time_132646048,execs_564729,op_quick,pos_144.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lambda/Anonymous functions" { final mul: fun (n: int) > int = fun (n: int) > int => n * 2; diff --git a/tests/fuzzed/id_000158,sig_06,src_000041,time_17560428,execs_89042,op_quick,pos_1158,val_+1.buzz b/tests/fuzzed/id_000158,sig_06,src_000041,time_17560428,execs_89042,op_quick,pos_1158,val_+1.buzz index 3177fef9..88fb02e4 100644 --- a/tests/fuzzed/id_000158,sig_06,src_000041,time_17560428,execs_89042,op_quick,pos_1158,val_+1.buzz +++ b/tests/fuzzed/id_000158,sig_06,src_000041,time_17560428,execs_89042,op_quick,pos_1158,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000159,sig_06,src_000041,time_17620059,execs_89256,op_quick,pos_1348,val_+1.buzz b/tests/fuzzed/id_000159,sig_06,src_000041,time_17620059,execs_89256,op_quick,pos_1348,val_+1.buzz index ad929142..a1132be0 100644 --- a/tests/fuzzed/id_000159,sig_06,src_000041,time_17620059,execs_89256,op_quick,pos_1348,val_+1.buzz +++ b/tests/fuzzed/id_000159,sig_06,src_000041,time_17620059,execs_89256,op_quick,pos_1348,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000159,src_000030,time_151166653,execs_631064,op_quick,pos_200.buzz b/tests/fuzzed/id_000159,src_000030,time_151166653,execs_631064,op_quick,pos_200.buzz index 2af61053..9e842f71 100644 --- a/tests/fuzzed/id_000159,src_000030,time_151166653,execs_631064,op_quick,pos_200.buzz +++ b/tests/fuzzed/id_000159,src_000030,time_151166653,execs_631064,op_quick,pos_200.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000160,sig_06,src_000041,time_17808080,execs_89986,op_flip2,pos_367.buzz b/tests/fuzzed/id_000160,sig_06,src_000041,time_17808080,execs_89986,op_flip2,pos_367.buzz index 837a75cb..74d8af99 100644 --- a/tests/fuzzed/id_000160,sig_06,src_000041,time_17808080,execs_89986,op_flip2,pos_367.buzz +++ b/tests/fuzzed/id_000160,sig_06,src_000041,time_17808080,execs_89986,op_flip2,pos_367.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000160,src_000030,time_151195334,execs_631178,op_quick,pos_289.buzz b/tests/fuzzed/id_000160,src_000030,time_151195334,execs_631178,op_quick,pos_289.buzz index bb088c44..8ef9fada 100644 --- a/tests/fuzzed/id_000160,src_000030,time_151195334,execs_631178,op_quick,pos_289.buzz +++ b/tests/fuzzed/id_000160,src_000030,time_151195334,execs_631178,op_quick,pos_289.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000161,sig_06,src_000041,time_17849378,execs_90143,op_flip2,pos_1105.buzz b/tests/fuzzed/id_000161,sig_06,src_000041,time_17849378,execs_90143,op_flip2,pos_1105.buzz index 0f582bbe..433df893 100644 --- a/tests/fuzzed/id_000161,sig_06,src_000041,time_17849378,execs_90143,op_flip2,pos_1105.buzz +++ b/tests/fuzzed/id_000161,sig_06,src_000041,time_17849378,execs_90143,op_flip2,pos_1105.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000161,src_000030,time_151298817,execs_631609,op_quick,pos_671.buzz b/tests/fuzzed/id_000161,src_000030,time_151298817,execs_631609,op_quick,pos_671.buzz index 444a44f1..088f900d 100644 --- a/tests/fuzzed/id_000161,src_000030,time_151298817,execs_631609,op_quick,pos_671.buzz +++ b/tests/fuzzed/id_000161,src_000030,time_151298817,execs_631609,op_quick,pos_671.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000162,sig_06,src_000003,time_18752646,execs_93847,op_quick,pos_597.buzz b/tests/fuzzed/id_000162,sig_06,src_000003,time_18752646,execs_93847,op_quick,pos_597.buzz index e454a6bf..38ad7709 100644 --- a/tests/fuzzed/id_000162,sig_06,src_000003,time_18752646,execs_93847,op_quick,pos_597.buzz +++ b/tests/fuzzed/id_000162,sig_06,src_000003,time_18752646,execs_93847,op_quick,pos_597.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000162,src_000030,time_151734520,execs_633310,op_arith8,pos_439,val_+20.buzz b/tests/fuzzed/id_000162,src_000030,time_151734520,execs_633310,op_arith8,pos_439,val_+20.buzz index dc4ee905..c1c5bf87 100644 --- a/tests/fuzzed/id_000162,src_000030,time_151734520,execs_633310,op_arith8,pos_439,val_+20.buzz +++ b/tests/fuzzed/id_000162,src_000030,time_151734520,execs_633310,op_arith8,pos_439,val_+20.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000163,sig_06,src_000003,time_19062258,execs_94996,op_quick,pos_1624.buzz b/tests/fuzzed/id_000163,sig_06,src_000003,time_19062258,execs_94996,op_quick,pos_1624.buzz index 831be63b..3089fa78 100644 --- a/tests/fuzzed/id_000163,sig_06,src_000003,time_19062258,execs_94996,op_quick,pos_1624.buzz +++ b/tests/fuzzed/id_000163,sig_06,src_000003,time_19062258,execs_94996,op_quick,pos_1624.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000163,src_000030,time_151877078,execs_633895,op_arith8,pos_1177,val_+27.buzz b/tests/fuzzed/id_000163,src_000030,time_151877078,execs_633895,op_arith8,pos_1177,val_+27.buzz index 683db054..5c0f8f2c 100644 --- a/tests/fuzzed/id_000163,src_000030,time_151877078,execs_633895,op_arith8,pos_1177,val_+27.buzz +++ b/tests/fuzzed/id_000163,src_000030,time_151877078,execs_633895,op_arith8,pos_1177,val_+27.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000164,sig_11,src_000003,time_19095426,execs_95116,op_quick,pos_1732.buzz b/tests/fuzzed/id_000164,sig_11,src_000003,time_19095426,execs_95116,op_quick,pos_1732.buzz index 5c7ab012..3ccfda9c 100644 --- a/tests/fuzzed/id_000164,sig_11,src_000003,time_19095426,execs_95116,op_quick,pos_1732.buzz +++ b/tests/fuzzed/id_000164,sig_11,src_000003,time_19095426,execs_95116,op_quick,pos_1732.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000164,src_001475,time_154919895,execs_647201,op_quick,pos_145.buzz b/tests/fuzzed/id_000164,src_001475,time_154919895,execs_647201,op_quick,pos_145.buzz index 6d788cdc..2fd3f737 100644 --- a/tests/fuzzed/id_000164,src_001475,time_154919895,execs_647201,op_quick,pos_145.buzz +++ b/tests/fuzzed/id_000164,src_001475,time_154919895,execs_647201,op_quick,pos_145.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000165,sig_06,src_000029,time_19996347,execs_98774,op_quick,pos_42,val_+4.buzz b/tests/fuzzed/id_000165,sig_06,src_000029,time_19996347,execs_98774,op_quick,pos_42,val_+4.buzz index c348d84c..7def8265 100644 --- a/tests/fuzzed/id_000165,sig_06,src_000029,time_19996347,execs_98774,op_quick,pos_42,val_+4.buzz +++ b/tests/fuzzed/id_000165,sig_06,src_000029,time_19996347,execs_98774,op_quick,pos_42,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [s r] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000165,src_001475,time_155188552,execs_648170,op_quick,pos_1113.buzz b/tests/fuzzed/id_000165,src_001475,time_155188552,execs_648170,op_quick,pos_1113.buzz index 3c4c852a..cb59e5d8 100644 --- a/tests/fuzzed/id_000165,src_001475,time_155188552,execs_648170,op_quick,pos_1113.buzz +++ b/tests/fuzzed/id_000165,src_001475,time_155188552,execs_648170,op_quick,pos_1113.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000166,sig_06,src_000029,time_20004883,execs_98814,op_quick,pos_82,val_+4.buzz b/tests/fuzzed/id_000166,sig_06,src_000029,time_20004883,execs_98814,op_quick,pos_82,val_+4.buzz index 6a253778..01317f0e 100644 --- a/tests/fuzzed/id_000166,sig_06,src_000029,time_20004883,execs_98814,op_quick,pos_82,val_+4.buzz +++ b/tests/fuzzed/id_000166,sig_06,src_000029,time_20004883,execs_98814,op_quick,pos_82,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000166,src_001475,time_155429965,execs_648988,op_quick,pos_1906.buzz b/tests/fuzzed/id_000166,src_001475,time_155429965,execs_648988,op_quick,pos_1906.buzz index 49333050..a27fd016 100644 --- a/tests/fuzzed/id_000166,src_001475,time_155429965,execs_648988,op_quick,pos_1906.buzz +++ b/tests/fuzzed/id_000166,src_001475,time_155429965,execs_648988,op_quick,pos_1906.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000167,sig_06,src_000029,time_20032108,execs_98934,op_quick,pos_178,val_+4.buzz b/tests/fuzzed/id_000167,sig_06,src_000029,time_20032108,execs_98934,op_quick,pos_178,val_+4.buzz index 83abe00a..f444aa24 100644 --- a/tests/fuzzed/id_000167,sig_06,src_000029,time_20032108,execs_98934,op_quick,pos_178,val_+4.buzz +++ b/tests/fuzzed/id_000167,sig_06,src_000029,time_20032108,execs_98934,op_quick,pos_178,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000167,src_002330,time_167303517,execs_690662,op_quick,pos_488.buzz b/tests/fuzzed/id_000167,src_002330,time_167303517,execs_690662,op_quick,pos_488.buzz index 3c266c76..283145c9 100644 --- a/tests/fuzzed/id_000167,src_002330,time_167303517,execs_690662,op_quick,pos_488.buzz +++ b/tests/fuzzed/id_000167,src_002330,time_167303517,execs_690662,op_quick,pos_488.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000168,sig_06,src_000029,time_20130305,execs_99336,op_quick,pos_543,val_+4.buzz b/tests/fuzzed/id_000168,sig_06,src_000029,time_20130305,execs_99336,op_quick,pos_543,val_+4.buzz index 1c3a3ce3..7eb24183 100644 --- a/tests/fuzzed/id_000168,sig_06,src_000029,time_20130305,execs_99336,op_quick,pos_543,val_+4.buzz +++ b/tests/fuzzed/id_000168,sig_06,src_000029,time_20130305,execs_99336,op_quick,pos_543,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000168,src_002295,time_169552579,execs_700399,op_quick,pos_361.buzz b/tests/fuzzed/id_000168,src_002295,time_169552579,execs_700399,op_quick,pos_361.buzz index 1a432c65..ecfc4478 100644 --- a/tests/fuzzed/id_000168,src_002295,time_169552579,execs_700399,op_quick,pos_361.buzz +++ b/tests/fuzzed/id_000168,src_002295,time_169552579,execs_700399,op_quick,pos_361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000169,sig_06,src_000029,time_20140911,execs_99379,op_quick,pos_574,val_+4.buzz b/tests/fuzzed/id_000169,sig_06,src_000029,time_20140911,execs_99379,op_quick,pos_574,val_+4.buzz index 4f0fdd2d..ad75249b 100644 --- a/tests/fuzzed/id_000169,sig_06,src_000029,time_20140911,execs_99379,op_quick,pos_574,val_+4.buzz +++ b/tests/fuzzed/id_000169,sig_06,src_000029,time_20140911,execs_99379,op_quick,pos_574,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000169,src_002931,time_172114514,execs_710320,op_havoc,rep_4.buzz b/tests/fuzzed/id_000169,src_002931,time_172114514,execs_710320,op_havoc,rep_4.buzz index 36c21874..5097ead2 100644 --- a/tests/fuzzed/id_000169,src_002931,time_172114514,execs_710320,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000169,src_002931,time_172114514,execs_710320,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/fuzzed/id_000170,sig_06,src_000029,time_20287093,execs_99951,op_quick,pos_1097,val_+4.buzz b/tests/fuzzed/id_000170,sig_06,src_000029,time_20287093,execs_99951,op_quick,pos_1097,val_+4.buzz index 35c561d3..514517c3 100644 --- a/tests/fuzzed/id_000170,sig_06,src_000029,time_20287093,execs_99951,op_quick,pos_1097,val_+4.buzz +++ b/tests/fuzzed/id_000170,sig_06,src_000029,time_20287093,execs_99951,op_quick,pos_1097,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000170,src_002049,time_172859960,execs_712036,op_quick,pos_545.buzz b/tests/fuzzed/id_000170,src_002049,time_172859960,execs_712036,op_quick,pos_545.buzz index dda2af2d..7ca0b80d 100644 --- a/tests/fuzzed/id_000170,src_002049,time_172859960,execs_712036,op_quick,pos_545.buzz +++ b/tests/fuzzed/id_000170,src_002049,time_172859960,execs_712036,op_quick,pos_545.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/fuzzed/id_000171,sig_06,src_000029,time_20554693,execs_101095,op_arith8,pos_1177,val_-14.buzz b/tests/fuzzed/id_000171,sig_06,src_000029,time_20554693,execs_101095,op_arith8,pos_1177,val_-14.buzz index 1e6f6a8f..f7911a5b 100644 --- a/tests/fuzzed/id_000171,sig_06,src_000029,time_20554693,execs_101095,op_arith8,pos_1177,val_-14.buzz +++ b/tests/fuzzed/id_000171,sig_06,src_000029,time_20554693,execs_101095,op_arith8,pos_1177,val_-14.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hello( name: mut [str] = [ "John", "Doe" ], diff --git a/tests/fuzzed/id_000171,src_000045,time_180281587,execs_738632,op_quick,pos_111.buzz b/tests/fuzzed/id_000171,src_000045,time_180281587,execs_738632,op_quick,pos_111.buzz index 38740215..5b605b21 100644 --- a/tests/fuzzed/id_000171,src_000045,time_180281587,execs_738632,op_quick,pos_111.buzz +++ b/tests/fuzzed/id_000171,src_000045,time_180281587,execs_738632,op_quick,pos_111.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000172,sig_06,src_000043,time_21391248,execs_104731,op_inf,rep_3.buzz b/tests/fuzzed/id_000172,sig_06,src_000043,time_21391248,execs_104731,op_inf,rep_3.buzz index 97e136fd..fee1abe4 100644 --- a/tests/fuzzed/id_000172,sig_06,src_000043,time_21391248,execs_104731,op_inf,rep_3.buzz +++ b/tests/fuzzed/id_000172,sig_06,src_000043,time_21391248,execs_104731,op_inf,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000172,src_000045,time_180306068,execs_738725,op_quick,pos_179.buzz b/tests/fuzzed/id_000172,src_000045,time_180306068,execs_738725,op_quick,pos_179.buzz index c1087abe..9146e301 100644 --- a/tests/fuzzed/id_000172,src_000045,time_180306068,execs_738725,op_quick,pos_179.buzz +++ b/tests/fuzzed/id_000172,src_000045,time_180306068,execs_738725,op_quick,pos_179.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000173,sig_06,src_000043,time_21686281,execs_105821,op_quick,pos_763,val_+3.buzz b/tests/fuzzed/id_000173,sig_06,src_000043,time_21686281,execs_105821,op_quick,pos_763,val_+3.buzz index 0db289c3..a0a30cab 100644 --- a/tests/fuzzed/id_000173,sig_06,src_000043,time_21686281,execs_105821,op_quick,pos_763,val_+3.buzz +++ b/tests/fuzzed/id_000173,sig_06,src_000043,time_21686281,execs_105821,op_quick,pos_763,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000173,src_002993,time_181655026,execs_744458,op_quick,pos_1146.buzz b/tests/fuzzed/id_000173,src_002993,time_181655026,execs_744458,op_quick,pos_1146.buzz index cbcde7d7..1e68e5a2 100644 --- a/tests/fuzzed/id_000173,src_002993,time_181655026,execs_744458,op_quick,pos_1146.buzz +++ b/tests/fuzzed/id_000173,src_002993,time_181655026,execs_744458,op_quick,pos_1146.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000174,sig_06,src_000043,time_21692063,execs_105842,op_quick,pos_772,val_+3.buzz b/tests/fuzzed/id_000174,sig_06,src_000043,time_21692063,execs_105842,op_quick,pos_772,val_+3.buzz index e329a457..42a6c0a1 100644 --- a/tests/fuzzed/id_000174,sig_06,src_000043,time_21692063,execs_105842,op_quick,pos_772,val_+3.buzz +++ b/tests/fuzzed/id_000174,sig_06,src_000043,time_21692063,execs_105842,op_quick,pos_772,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000174,src_002585,time_182673300,execs_748408,op_quick,pos_793.buzz b/tests/fuzzed/id_000174,src_002585,time_182673300,execs_748408,op_quick,pos_793.buzz index d29eb8b2..73066b2f 100644 --- a/tests/fuzzed/id_000174,src_002585,time_182673300,execs_748408,op_quick,pos_793.buzz +++ b/tests/fuzzed/id_000174,src_002585,time_182673300,execs_748408,op_quick,pos_793.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000175,sig_06,src_000043,time_21774292,execs_106146,op_quick,pos_1039,val_+3.buzz b/tests/fuzzed/id_000175,sig_06,src_000043,time_21774292,execs_106146,op_quick,pos_1039,val_+3.buzz index c08da007..b7ea0fa1 100644 --- a/tests/fuzzed/id_000175,sig_06,src_000043,time_21774292,execs_106146,op_quick,pos_1039,val_+3.buzz +++ b/tests/fuzzed/id_000175,sig_06,src_000043,time_21774292,execs_106146,op_quick,pos_1039,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000175,src_002248,time_187493256,execs_772257,op_quick,pos_192.buzz b/tests/fuzzed/id_000175,src_002248,time_187493256,execs_772257,op_quick,pos_192.buzz index 5c3937c8..eb7f00c1 100644 --- a/tests/fuzzed/id_000175,src_002248,time_187493256,execs_772257,op_quick,pos_192.buzz +++ b/tests/fuzzed/id_000175,src_002248,time_187493256,execs_772257,op_quick,pos_192.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000176,sig_06,src_000043,time_21883689,execs_106523,op_quick,pos_1379,val_+3.buzz b/tests/fuzzed/id_000176,sig_06,src_000043,time_21883689,execs_106523,op_quick,pos_1379,val_+3.buzz index 42fb58c1..82401e71 100644 --- a/tests/fuzzed/id_000176,sig_06,src_000043,time_21883689,execs_106523,op_quick,pos_1379,val_+3.buzz +++ b/tests/fuzzed/id_000176,sig_06,src_000043,time_21883689,execs_106523,op_quick,pos_1379,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000176,src_002034,time_189032794,execs_779095,op_quick,pos_96.buzz b/tests/fuzzed/id_000176,src_002034,time_189032794,execs_779095,op_quick,pos_96.buzz index 1ebf3e9d..8cc48db5 100644 --- a/tests/fuzzed/id_000176,src_002034,time_189032794,execs_779095,op_quick,pos_96.buzz +++ b/tests/fuzzed/id_000176,src_002034,time_189032794,execs_779095,op_quick,pos_96.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, diff --git a/tests/fuzzed/id_000177,sig_06,src_000043,time_21960753,execs_106794,op_quick,pos_1638,val_+3.buzz b/tests/fuzzed/id_000177,sig_06,src_000043,time_21960753,execs_106794,op_quick,pos_1638,val_+3.buzz index c0e9f49c..63c27cca 100644 --- a/tests/fuzzed/id_000177,sig_06,src_000043,time_21960753,execs_106794,op_quick,pos_1638,val_+3.buzz +++ b/tests/fuzzed/id_000177,sig_06,src_000043,time_21960753,execs_106794,op_quick,pos_1638,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000177,src_002034,time_189421710,execs_779774,op_quick,pos_774.buzz b/tests/fuzzed/id_000177,src_002034,time_189421710,execs_779774,op_quick,pos_774.buzz index 0d23ef06..0b00ce5c 100644 --- a/tests/fuzzed/id_000177,src_002034,time_189421710,execs_779774,op_quick,pos_774.buzz +++ b/tests/fuzzed/id_000177,src_002034,time_189421710,execs_779774,op_quick,pos_774.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/fuzzed/id_000178,sig_06,src_000043,time_21965617,execs_106813,op_quick,pos_1645,val_+3.buzz b/tests/fuzzed/id_000178,sig_06,src_000043,time_21965617,execs_106813,op_quick,pos_1645,val_+3.buzz index 773bd239..2889f8bb 100644 --- a/tests/fuzzed/id_000178,sig_06,src_000043,time_21965617,execs_106813,op_quick,pos_1645,val_+3.buzz +++ b/tests/fuzzed/id_000178,sig_06,src_000043,time_21965617,execs_106813,op_quick,pos_1645,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000178,src_001735,time_195697600,execs_801006,op_quick,pos_1056.buzz b/tests/fuzzed/id_000178,src_001735,time_195697600,execs_801006,op_quick,pos_1056.buzz index 15757373..502407db 100644 --- a/tests/fuzzed/id_000178,src_001735,time_195697600,execs_801006,op_quick,pos_1056.buzz +++ b/tests/fuzzed/id_000178,src_001735,time_195697600,execs_801006,op_quick,pos_1056.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000179,sig_06,src_000043,time_21973559,execs_106843,op_quick,pos_1675,val_+3.buzz b/tests/fuzzed/id_000179,sig_06,src_000043,time_21973559,execs_106843,op_quick,pos_1675,val_+3.buzz index df745825..de1560fe 100644 --- a/tests/fuzzed/id_000179,sig_06,src_000043,time_21973559,execs_106843,op_quick,pos_1675,val_+3.buzz +++ b/tests/fuzzed/id_000179,sig_06,src_000043,time_21973559,execs_106843,op_quick,pos_1675,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000179,src_001511,time_198594135,execs_814057,op_quick,pos_422.buzz b/tests/fuzzed/id_000179,src_001511,time_198594135,execs_814057,op_quick,pos_422.buzz index fc1d9261..ef8b7385 100644 --- a/tests/fuzzed/id_000179,src_001511,time_198594135,execs_814057,op_quick,pos_422.buzz +++ b/tests/fuzzed/id_000179,src_001511,time_198594135,execs_814057,op_quick,pos_422.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000180,sig_06,src_000043,time_22085529,execs_107218,op_flip2,pos_166.buzz b/tests/fuzzed/id_000180,sig_06,src_000043,time_22085529,execs_107218,op_flip2,pos_166.buzz index 397617b8..6be3d637 100644 --- a/tests/fuzzed/id_000180,sig_06,src_000043,time_22085529,execs_107218,op_flip2,pos_166.buzz +++ b/tests/fuzzed/id_000180,sig_06,src_000043,time_22085529,execs_107218,op_flip2,pos_166.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000180,src_001511,time_199075942,execs_815845,op_quick,pos_2197.buzz b/tests/fuzzed/id_000180,src_001511,time_199075942,execs_815845,op_quick,pos_2197.buzz index 436d9ebf..a9e8ce98 100644 --- a/tests/fuzzed/id_000180,src_001511,time_199075942,execs_815845,op_quick,pos_2197.buzz +++ b/tests/fuzzed/id_000180,src_001511,time_199075942,execs_815845,op_quick,pos_2197.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000181,src_000723,time_202248786,execs_827898,op_quick,pos_489.buzz b/tests/fuzzed/id_000181,src_000723,time_202248786,execs_827898,op_quick,pos_489.buzz index a70c1b34..2d01f952 100644 --- a/tests/fuzzed/id_000181,src_000723,time_202248786,execs_827898,op_quick,pos_489.buzz +++ b/tests/fuzzed/id_000181,src_000723,time_202248786,execs_827898,op_quick,pos_489.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000182,sig_06,src_000043,time_23096210,execs_110896,op_havoc,rep_2.buzz b/tests/fuzzed/id_000182,sig_06,src_000043,time_23096210,execs_110896,op_havoc,rep_2.buzz index 46086487..f2317143 100644 --- a/tests/fuzzed/id_000182,sig_06,src_000043,time_23096210,execs_110896,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000182,sig_06,src_000043,time_23096210,execs_110896,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000182,src_003065,time_202691712,execs_829235,op_quick,pos_275.buzz b/tests/fuzzed/id_000182,src_003065,time_202691712,execs_829235,op_quick,pos_275.buzz index 7789de74..98de0086 100644 --- a/tests/fuzzed/id_000182,src_003065,time_202691712,execs_829235,op_quick,pos_275.buzz +++ b/tests/fuzzed/id_000182,src_003065,time_202691712,execs_829235,op_quick,pos_275.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000183,sig_11,src_001513,time_24670687,execs_116699,op_quick,pos_1732,val_+2.buzz b/tests/fuzzed/id_000183,sig_11,src_001513,time_24670687,execs_116699,op_quick,pos_1732,val_+2.buzz index 03ff64e6..f1314d3d 100644 --- a/tests/fuzzed/id_000183,sig_11,src_001513,time_24670687,execs_116699,op_quick,pos_1732,val_+2.buzz +++ b/tests/fuzzed/id_000183,sig_11,src_001513,time_24670687,execs_116699,op_quick,pos_1732,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000184,sig_06,src_001513,time_24726807,execs_116894,op_quick,pos_1903,val_+2.buzz b/tests/fuzzed/id_000184,sig_06,src_001513,time_24726807,execs_116894,op_quick,pos_1903,val_+2.buzz index b6bebc7b..1d35068f 100644 --- a/tests/fuzzed/id_000184,sig_06,src_001513,time_24726807,execs_116894,op_quick,pos_1903,val_+2.buzz +++ b/tests/fuzzed/id_000184,sig_06,src_001513,time_24726807,execs_116894,op_quick,pos_1903,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000184,src_001769,time_204389712,execs_835926,op_quick,pos_1523.buzz b/tests/fuzzed/id_000184,src_001769,time_204389712,execs_835926,op_quick,pos_1523.buzz index 91cf8a5e..a975c747 100644 --- a/tests/fuzzed/id_000184,src_001769,time_204389712,execs_835926,op_quick,pos_1523.buzz +++ b/tests/fuzzed/id_000184,src_001769,time_204389712,execs_835926,op_quick,pos_1523.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000185,sig_06,src_001513,time_24733896,execs_116921,op_quick,pos_1930,val_+2.buzz b/tests/fuzzed/id_000185,sig_06,src_001513,time_24733896,execs_116921,op_quick,pos_1930,val_+2.buzz index 2e160d70..2dfc8332 100644 --- a/tests/fuzzed/id_000185,sig_06,src_001513,time_24733896,execs_116921,op_quick,pos_1930,val_+2.buzz +++ b/tests/fuzzed/id_000185,sig_06,src_001513,time_24733896,execs_116921,op_quick,pos_1930,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000185,src_002566,time_205435280,execs_839748,op_quick,pos_270.buzz b/tests/fuzzed/id_000185,src_002566,time_205435280,execs_839748,op_quick,pos_270.buzz index 626382bb..c759898c 100644 --- a/tests/fuzzed/id_000185,src_002566,time_205435280,execs_839748,op_quick,pos_270.buzz +++ b/tests/fuzzed/id_000185,src_002566,time_205435280,execs_839748,op_quick,pos_270.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000186,sig_06,src_001513,time_24749023,execs_116978,op_quick,pos_1975,val_+2.buzz b/tests/fuzzed/id_000186,sig_06,src_001513,time_24749023,execs_116978,op_quick,pos_1975,val_+2.buzz index b3ec5ad3..dfda49ad 100644 --- a/tests/fuzzed/id_000186,sig_06,src_001513,time_24749023,execs_116978,op_quick,pos_1975,val_+2.buzz +++ b/tests/fuzzed/id_000186,sig_06,src_001513,time_24749023,execs_116978,op_quick,pos_1975,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000186,src_000052,time_210967608,execs_860605,op_quick,pos_214.buzz b/tests/fuzzed/id_000186,src_000052,time_210967608,execs_860605,op_quick,pos_214.buzz index 497b056b..951b85aa 100644 --- a/tests/fuzzed/id_000186,src_000052,time_210967608,execs_860605,op_quick,pos_214.buzz +++ b/tests/fuzzed/id_000186,src_000052,time_210967608,execs_860605,op_quick,pos_214.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Person { name: str, diff --git a/tests/fuzzed/id_000187,sig_06,src_000062,time_26456345,execs_123726,op_inf,rep_3.buzz b/tests/fuzzed/id_000187,sig_06,src_000062,time_26456345,execs_123726,op_inf,rep_3.buzz index 3be8ee7a..e2b5944f 100644 --- a/tests/fuzzed/id_000187,sig_06,src_000062,time_26456345,execs_123726,op_inf,rep_3.buzz +++ b/tests/fuzzed/id_000187,sig_06,src_000062,time_26456345,execs_123726,op_inf,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000187,src_000004,time_214211283,execs_873047,op_quick,pos_164.buzz b/tests/fuzzed/id_000187,src_000004,time_214211283,execs_873047,op_quick,pos_164.buzz index b33e529f..eb114b38 100644 --- a/tests/fuzzed/id_000187,src_000004,time_214211283,execs_873047,op_quick,pos_164.buzz +++ b/tests/fuzzed/id_000187,src_000004,time_214211283,execs_873047,op_quick,pos_164.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000188,sig_06,src_000062,time_26522012,execs_123960,op_inf,rep_3.buzz b/tests/fuzzed/id_000188,sig_06,src_000062,time_26522012,execs_123960,op_inf,rep_3.buzz index d79381f4..f1980e56 100644 --- a/tests/fuzzed/id_000188,sig_06,src_000062,time_26522012,execs_123960,op_inf,rep_3.buzz +++ b/tests/fuzzed/id_000188,sig_06,src_000062,time_26522012,execs_123960,op_inf,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000188,src_000004,time_214275257,execs_873288,op_quick,pos_380.buzz b/tests/fuzzed/id_000188,src_000004,time_214275257,execs_873288,op_quick,pos_380.buzz index 76f6e638..d50c7813 100644 --- a/tests/fuzzed/id_000188,src_000004,time_214275257,execs_873288,op_quick,pos_380.buzz +++ b/tests/fuzzed/id_000188,src_000004,time_214275257,execs_873288,op_quick,pos_380.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000189,sig_06,src_000062,time_27533658,execs_127407,op_havoc,rep_2.buzz b/tests/fuzzed/id_000189,sig_06,src_000062,time_27533658,execs_127407,op_havoc,rep_2.buzz index fab6e7f9..90125fe0 100644 --- a/tests/fuzzed/id_000189,sig_06,src_000062,time_27533658,execs_127407,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000189,sig_06,src_000062,time_27533658,execs_127407,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000189,src_000004,time_214362282,execs_873607,op_quick,pos_650.buzz b/tests/fuzzed/id_000189,src_000004,time_214362282,execs_873607,op_quick,pos_650.buzz index d937d4d3..edabb64e 100644 --- a/tests/fuzzed/id_000189,src_000004,time_214362282,execs_873607,op_quick,pos_650.buzz +++ b/tests/fuzzed/id_000189,src_000004,time_214362282,execs_873607,op_quick,pos_650.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000190,sig_06,src_000062,time_27575102,execs_127519,op_havoc,rep_2.buzz b/tests/fuzzed/id_000190,sig_06,src_000062,time_27575102,execs_127519,op_havoc,rep_2.buzz index 5d741bcd..a86f5e21 100644 --- a/tests/fuzzed/id_000190,sig_06,src_000062,time_27575102,execs_127519,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000190,sig_06,src_000062,time_27575102,execs_127519,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000190,src_000004,time_214471338,execs_874019,op_quick,pos_1037.buzz b/tests/fuzzed/id_000190,src_000004,time_214471338,execs_874019,op_quick,pos_1037.buzz index 2a3cd972..44900472 100644 --- a/tests/fuzzed/id_000190,src_000004,time_214471338,execs_874019,op_quick,pos_1037.buzz +++ b/tests/fuzzed/id_000190,src_000004,time_214471338,execs_874019,op_quick,pos_1037.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000191,sig_06,src_000062,time_27601964,execs_127607,op_havoc,rep_2.buzz b/tests/fuzzed/id_000191,sig_06,src_000062,time_27601964,execs_127607,op_havoc,rep_2.buzz index 67b60ff2..e616d12e 100644 --- a/tests/fuzzed/id_000191,sig_06,src_000062,time_27601964,execs_127607,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000191,sig_06,src_000062,time_27601964,execs_127607,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000191,src_000004,time_214562447,execs_874357,op_quick,pos_1350.buzz b/tests/fuzzed/id_000191,src_000004,time_214562447,execs_874357,op_quick,pos_1350.buzz index 1fd93379..c74cfb93 100644 --- a/tests/fuzzed/id_000191,src_000004,time_214562447,execs_874357,op_quick,pos_1350.buzz +++ b/tests/fuzzed/id_000191,src_000004,time_214562447,execs_874357,op_quick,pos_1350.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000192,sig_06,src_000062,time_27613589,execs_127646,op_havoc,rep_2.buzz b/tests/fuzzed/id_000192,sig_06,src_000062,time_27613589,execs_127646,op_havoc,rep_2.buzz index 6aa2415e..90130395 100644 --- a/tests/fuzzed/id_000192,sig_06,src_000062,time_27613589,execs_127646,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000192,sig_06,src_000062,time_27613589,execs_127646,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000192,src_002024,time_216472182,execs_880398,op_quick,pos_95.buzz b/tests/fuzzed/id_000192,src_002024,time_216472182,execs_880398,op_quick,pos_95.buzz index d1d37770..12914c98 100644 --- a/tests/fuzzed/id_000192,src_002024,time_216472182,execs_880398,op_quick,pos_95.buzz +++ b/tests/fuzzed/id_000192,src_002024,time_216472182,execs_880398,op_quick,pos_95.buzz @@ -1,5 +1,5 @@ import "Std"; -import "math" as math; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234,bmessage: "math\\abs"); diff --git a/tests/fuzzed/id_000193,sig_06,src_000062,time_27670992,execs_127846,op_havoc,rep_1.buzz b/tests/fuzzed/id_000193,sig_06,src_000062,time_27670992,execs_127846,op_havoc,rep_1.buzz index 88973a25..3be90da4 100644 --- a/tests/fuzzed/id_000193,sig_06,src_000062,time_27670992,execs_127846,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000193,sig_06,src_000062,time_27670992,execs_127846,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000194,sig_06,src_000062,time_27946896,execs_128742,op_havoc,rep_1.buzz b/tests/fuzzed/id_000194,sig_06,src_000062,time_27946896,execs_128742,op_havoc,rep_1.buzz index 1e4c7fd3..a5aa6247 100644 --- a/tests/fuzzed/id_000194,sig_06,src_000062,time_27946896,execs_128742,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000194,sig_06,src_000062,time_27946896,execs_128742,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000195,sig_06,src_000062,time_28222078,execs_129633,op_havoc,rep_2.buzz b/tests/fuzzed/id_000195,sig_06,src_000062,time_28222078,execs_129633,op_havoc,rep_2.buzz index 3bd6cbff..a7486fd0 100644 --- a/tests/fuzzed/id_000195,sig_06,src_000062,time_28222078,execs_129633,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000195,sig_06,src_000062,time_28222078,execs_129633,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000197,sig_11,src_000014,time_28587620,execs_131137,op_quick,pos_620,val_+1.buzz b/tests/fuzzed/id_000197,sig_11,src_000014,time_28587620,execs_131137,op_quick,pos_620,val_+1.buzz index e149bcdc..841efca5 100644 --- a/tests/fuzzed/id_000197,sig_11,src_000014,time_28587620,execs_131137,op_quick,pos_620,val_+1.buzz +++ b/tests/fuzzed/id_000197,sig_11,src_000014,time_28587620,execs_131137,op_quick,pos_620,val_+1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Escape sequences" { std\print("\{escaped interpolation}, \nhello\tworld, backslash \\ \"hey\""); diff --git a/tests/fuzzed/id_000198,sig_11,src_000037,time_29077210,execs_133450,op_quick,pos_452,val_+3.buzz b/tests/fuzzed/id_000198,sig_11,src_000037,time_29077210,execs_133450,op_quick,pos_452,val_+3.buzz index 6696c822..69c8ac85 100644 --- a/tests/fuzzed/id_000198,sig_11,src_000037,time_29077210,execs_133450,op_quick,pos_452,val_+3.buzz +++ b/tests/fuzzed/id_000198,sig_11,src_000037,time_29077210,execs_133450,op_quick,pos_452,val_+3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "continue properly jumps and closes scope" { foreach (value in 1..5) { diff --git a/tests/fuzzed/id_000208,sig_06,src_000026,time_29630501,execs_139797,op_inf,rep_12.buzz b/tests/fuzzed/id_000208,sig_06,src_000026,time_29630501,execs_139797,op_inf,rep_12.buzz index 734c31d1..484c381b 100644 --- a/tests/fuzzed/id_000208,sig_06,src_000026,time_29630501,execs_139797,op_inf,rep_12.buzz +++ b/tests/fuzzed/id_000208,sig_06,src_000026,time_29630501,execs_139797,op_inf,rep_12.buzz @@ -1,4 +1,4 @@ -import "debug"; +import "buzz:debug"; enum MyEnum { One, diff --git a/tests/fuzzed/id_000209,sig_06,src_000026,time_29630595,execs_139798,op_inf,rep_12.buzz b/tests/fuzzed/id_000209,sig_06,src_000026,time_29630595,execs_139798,op_inf,rep_12.buzz index 6930fdf5..ed62c53f 100644 --- a/tests/fuzzed/id_000209,sig_06,src_000026,time_29630595,execs_139798,op_inf,rep_12.buzz +++ b/tests/fuzzed/id_000209,sig_06,src_000026,time_29630595,execs_139798,op_inf,rep_12.buzz @@ -1,4 +1,4 @@ -import "debug"; +import "buzz:debug"; enum MyEnum { One, diff --git a/tests/fuzzed/id_000210,sig_06,src_000026,time_29775683,execs_141256,op_flip1,pos_69.buzz b/tests/fuzzed/id_000210,sig_06,src_000026,time_29775683,execs_141256,op_flip1,pos_69.buzz index a790b4a9..14a2b832 100644 --- a/tests/fuzzed/id_000210,sig_06,src_000026,time_29775683,execs_141256,op_flip1,pos_69.buzz +++ b/tests/fuzzed/id_000210,sig_06,src_000026,time_29775683,execs_141256,op_flip1,pos_69.buzz @@ -1,4 +1,4 @@ -import "debug"; +import "buzz:debug"; enum MyEnum { One, diff --git a/tests/fuzzed/id_000211,sig_06,src_000048,time_30611700,execs_147988,op_quick,pos_96,val_+1.buzz b/tests/fuzzed/id_000211,sig_06,src_000048,time_30611700,execs_147988,op_quick,pos_96,val_+1.buzz index 76e7e3f7..ef6de7a2 100644 --- a/tests/fuzzed/id_000211,sig_06,src_000048,time_30611700,execs_147988,op_quick,pos_96,val_+1.buzz +++ b/tests/fuzzed/id_000211,sig_06,src_000048,time_30611700,execs_147988,op_quick,pos_96,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000212,sig_06,src_000048,time_30639923,execs_148098,op_quick,pos_206,val_+1.buzz b/tests/fuzzed/id_000212,sig_06,src_000048,time_30639923,execs_148098,op_quick,pos_206,val_+1.buzz index 2f9b9247..cde767ea 100644 --- a/tests/fuzzed/id_000212,sig_06,src_000048,time_30639923,execs_148098,op_quick,pos_206,val_+1.buzz +++ b/tests/fuzzed/id_000212,sig_06,src_000048,time_30639923,execs_148098,op_quick,pos_206,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000213,sig_06,src_000048,time_30706654,execs_148338,op_quick,pos_432,val_+1.buzz b/tests/fuzzed/id_000213,sig_06,src_000048,time_30706654,execs_148338,op_quick,pos_432,val_+1.buzz index 6a516e94..42a80f93 100644 --- a/tests/fuzzed/id_000213,sig_06,src_000048,time_30706654,execs_148338,op_quick,pos_432,val_+1.buzz +++ b/tests/fuzzed/id_000213,sig_06,src_000048,time_30706654,execs_148338,op_quick,pos_432,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000214,sig_06,src_000048,time_30729033,execs_148412,op_quick,pos_505,val_+1.buzz b/tests/fuzzed/id_000214,sig_06,src_000048,time_30729033,execs_148412,op_quick,pos_505,val_+1.buzz index 457aa36f..e9ae7513 100644 --- a/tests/fuzzed/id_000214,sig_06,src_000048,time_30729033,execs_148412,op_quick,pos_505,val_+1.buzz +++ b/tests/fuzzed/id_000214,sig_06,src_000048,time_30729033,execs_148412,op_quick,pos_505,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000215,sig_06,src_000048,time_30775865,execs_148578,op_quick,pos_646,val_+1.buzz b/tests/fuzzed/id_000215,sig_06,src_000048,time_30775865,execs_148578,op_quick,pos_646,val_+1.buzz index f3badb9d..e6c1773e 100644 --- a/tests/fuzzed/id_000215,sig_06,src_000048,time_30775865,execs_148578,op_quick,pos_646,val_+1.buzz +++ b/tests/fuzzed/id_000215,sig_06,src_000048,time_30775865,execs_148578,op_quick,pos_646,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000216,sig_06,src_000048,time_30880180,execs_148928,op_quick,pos_945,val_+1.buzz b/tests/fuzzed/id_000216,sig_06,src_000048,time_30880180,execs_148928,op_quick,pos_945,val_+1.buzz index f105bcee..74140426 100644 --- a/tests/fuzzed/id_000216,sig_06,src_000048,time_30880180,execs_148928,op_quick,pos_945,val_+1.buzz +++ b/tests/fuzzed/id_000216,sig_06,src_000048,time_30880180,execs_148928,op_quick,pos_945,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000217,sig_06,src_000048,time_30893991,execs_148980,op_quick,pos_973,val_+1.buzz b/tests/fuzzed/id_000217,sig_06,src_000048,time_30893991,execs_148980,op_quick,pos_973,val_+1.buzz index eb14055c..bed4044f 100644 --- a/tests/fuzzed/id_000217,sig_06,src_000048,time_30893991,execs_148980,op_quick,pos_973,val_+1.buzz +++ b/tests/fuzzed/id_000217,sig_06,src_000048,time_30893991,execs_148980,op_quick,pos_973,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000218,sig_06,src_000048,time_31098067,execs_149571,op_quick,pos_1167,val_+1.buzz b/tests/fuzzed/id_000218,sig_06,src_000048,time_31098067,execs_149571,op_quick,pos_1167,val_+1.buzz index 5e80fdc5..6b7bc9de 100644 --- a/tests/fuzzed/id_000218,sig_06,src_000048,time_31098067,execs_149571,op_quick,pos_1167,val_+1.buzz +++ b/tests/fuzzed/id_000218,sig_06,src_000048,time_31098067,execs_149571,op_quick,pos_1167,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000219,sig_06,src_000048,time_31127331,execs_149663,op_quick,pos_1187,val_+1.buzz b/tests/fuzzed/id_000219,sig_06,src_000048,time_31127331,execs_149663,op_quick,pos_1187,val_+1.buzz index 248e524d..5671cc87 100644 --- a/tests/fuzzed/id_000219,sig_06,src_000048,time_31127331,execs_149663,op_quick,pos_1187,val_+1.buzz +++ b/tests/fuzzed/id_000219,sig_06,src_000048,time_31127331,execs_149663,op_quick,pos_1187,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000220,sig_06,src_000048,time_31133468,execs_149681,op_quick,pos_1193,val_+1.buzz b/tests/fuzzed/id_000220,sig_06,src_000048,time_31133468,execs_149681,op_quick,pos_1193,val_+1.buzz index 9c6e90bb..e2f8b09b 100644 --- a/tests/fuzzed/id_000220,sig_06,src_000048,time_31133468,execs_149681,op_quick,pos_1193,val_+1.buzz +++ b/tests/fuzzed/id_000220,sig_06,src_000048,time_31133468,execs_149681,op_quick,pos_1193,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000221,sig_06,src_000048,time_31134081,execs_149683,op_quick,pos_1195,val_+1.buzz b/tests/fuzzed/id_000221,sig_06,src_000048,time_31134081,execs_149683,op_quick,pos_1195,val_+1.buzz index 2b827591..59c0e784 100644 --- a/tests/fuzzed/id_000221,sig_06,src_000048,time_31134081,execs_149683,op_quick,pos_1195,val_+1.buzz +++ b/tests/fuzzed/id_000221,sig_06,src_000048,time_31134081,execs_149683,op_quick,pos_1195,val_+1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000222,sig_11,src_000023,time_33486227,execs_154769,op_havoc,rep_1.buzz b/tests/fuzzed/id_000222,sig_11,src_000023,time_33486227,execs_154769,op_havoc,rep_1.buzz index ba56ebe2..0fad2195 100644 --- a/tests/fuzzed/id_000222,sig_11,src_000023,time_33486227,execs_154769,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000222,sig_11,src_000023,time_33486227,execs_154769,op_havoc,rep_1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/fuzzed/id_000223,sig_11,src_000023,time_33501291,execs_154794,op_havoc,rep_2.buzz b/tests/fuzzed/id_000223,sig_11,src_000023,time_33501291,execs_154794,op_havoc,rep_2.buzz index 1bcfe536..132d5b81 100644 --- a/tests/fuzzed/id_000223,sig_11,src_000023,time_33501291,execs_154794,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000223,sig_11,src_000023,time_33501291,execs_154794,op_havoc,rep_2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/fuzzed/id_000224,sig_11,src_000023,time_33514023,execs_154818,op_havoc,rep_1.buzz b/tests/fuzzed/id_000224,sig_11,src_000023,time_33514023,execs_154818,op_havoc,rep_1.buzz index eec22afc..3664e4e4 100644 --- a/tests/fuzzed/id_000224,sig_11,src_000023,time_33514023,execs_154818,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000224,sig_11,src_000023,time_33514023,execs_154818,op_havoc,rep_1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "math" as math; +import "buzz:std"; +import "buzz:math" as math; test "math" { std\assert(math\abs(-12.234) == 12.234, message: "math\\abs"); diff --git a/tests/fuzzed/id_000225,sig_06,src_000031,time_35414892,execs_158766,op_quick,pos_413,val_+2.buzz b/tests/fuzzed/id_000225,sig_06,src_000031,time_35414892,execs_158766,op_quick,pos_413,val_+2.buzz index ce3831c4..0dfe3590 100644 --- a/tests/fuzzed/id_000225,sig_06,src_000031,time_35414892,execs_158766,op_quick,pos_413,val_+2.buzz +++ b/tests/fuzzed/id_000225,sig_06,src_000031,time_35414892,execs_158766,op_quick,pos_413,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/fuzzed/id_000226,sig_06,src_000031,time_35613427,execs_159728,op_arith8,pos_420,val_+13.buzz b/tests/fuzzed/id_000226,sig_06,src_000031,time_35613427,execs_159728,op_arith8,pos_420,val_+13.buzz index 383318f3..5aedd4c3 100644 --- a/tests/fuzzed/id_000226,sig_06,src_000031,time_35613427,execs_159728,op_arith8,pos_420,val_+13.buzz +++ b/tests/fuzzed/id_000226,sig_06,src_000031,time_35613427,execs_159728,op_arith8,pos_420,val_+13.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/fuzzed/id_000227,sig_11,src_000017,time_36221548,execs_162414,op_quick,pos_543,val_+2.buzz b/tests/fuzzed/id_000227,sig_11,src_000017,time_36221548,execs_162414,op_quick,pos_543,val_+2.buzz index aea065cd..a4fa8ac4 100644 --- a/tests/fuzzed/id_000227,sig_11,src_000017,time_36221548,execs_162414,op_quick,pos_543,val_+2.buzz +++ b/tests/fuzzed/id_000227,sig_11,src_000017,time_36221548,execs_162414,op_quick,pos_543,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000228,sig_06,src_000017,time_36378948,execs_163029,op_quick,pos_1084,val_+2.buzz b/tests/fuzzed/id_000228,sig_06,src_000017,time_36378948,execs_163029,op_quick,pos_1084,val_+2.buzz index df6fa03b..9d701ab3 100644 --- a/tests/fuzzed/id_000228,sig_06,src_000017,time_36378948,execs_163029,op_quick,pos_1084,val_+2.buzz +++ b/tests/fuzzed/id_000228,sig_06,src_000017,time_36378948,execs_163029,op_quick,pos_1084,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000229,sig_06,src_000017,time_36540958,execs_163656,op_flip16,pos_955.buzz b/tests/fuzzed/id_000229,sig_06,src_000017,time_36540958,execs_163656,op_flip16,pos_955.buzz index a02bed0b..e80bfefd 100644 --- a/tests/fuzzed/id_000229,sig_06,src_000017,time_36540958,execs_163656,op_flip16,pos_955.buzz +++ b/tests/fuzzed/id_000229,sig_06,src_000017,time_36540958,execs_163656,op_flip16,pos_955.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "foreach on list" { final list = [ 1, 2, 3 ]; diff --git a/tests/fuzzed/id_000230,sig_06,src_001363,time_37170525,execs_166260,op_inf,rep_2.buzz b/tests/fuzzed/id_000230,sig_06,src_001363,time_37170525,execs_166260,op_inf,rep_2.buzz index 50914496..a692b559 100644 --- a/tests/fuzzed/id_000230,sig_06,src_001363,time_37170525,execs_166260,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000230,sig_06,src_001363,time_37170525,execs_166260,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000231,sig_06,src_000005,time_37963086,execs_169564,op_quick,pos_151,val_+2.buzz b/tests/fuzzed/id_000231,sig_06,src_000005,time_37963086,execs_169564,op_quick,pos_151,val_+2.buzz index 2904a4cc..e0686030 100644 --- a/tests/fuzzed/id_000231,sig_06,src_000005,time_37963086,execs_169564,op_quick,pos_151,val_+2.buzz +++ b/tests/fuzzed/id_000231,sig_06,src_000005,time_37963086,execs_169564,op_quick,pos_151,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000232,sig_06,src_000005,time_37968237,execs_169589,op_quick,pos_176,val_+2.buzz b/tests/fuzzed/id_000232,sig_06,src_000005,time_37968237,execs_169589,op_quick,pos_176,val_+2.buzz index ff26dac1..75fefe63 100644 --- a/tests/fuzzed/id_000232,sig_06,src_000005,time_37968237,execs_169589,op_quick,pos_176,val_+2.buzz +++ b/tests/fuzzed/id_000232,sig_06,src_000005,time_37968237,execs_169589,op_quick,pos_176,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000233,sig_06,src_000005,time_37981668,execs_169650,op_quick,pos_237,val_+2.buzz b/tests/fuzzed/id_000233,sig_06,src_000005,time_37981668,execs_169650,op_quick,pos_237,val_+2.buzz index 840d339e..699b00ae 100644 --- a/tests/fuzzed/id_000233,sig_06,src_000005,time_37981668,execs_169650,op_quick,pos_237,val_+2.buzz +++ b/tests/fuzzed/id_000233,sig_06,src_000005,time_37981668,execs_169650,op_quick,pos_237,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000234,sig_06,src_000005,time_37983850,execs_169661,op_quick,pos_248,val_+2.buzz b/tests/fuzzed/id_000234,sig_06,src_000005,time_37983850,execs_169661,op_quick,pos_248,val_+2.buzz index 54cae8ea..e40e6acb 100644 --- a/tests/fuzzed/id_000234,sig_06,src_000005,time_37983850,execs_169661,op_quick,pos_248,val_+2.buzz +++ b/tests/fuzzed/id_000234,sig_06,src_000005,time_37983850,execs_169661,op_quick,pos_248,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000235,sig_06,src_000005,time_37985373,execs_169668,op_quick,pos_255,val_+2.buzz b/tests/fuzzed/id_000235,sig_06,src_000005,time_37985373,execs_169668,op_quick,pos_255,val_+2.buzz index e7865eb8..2aa13054 100644 --- a/tests/fuzzed/id_000235,sig_06,src_000005,time_37985373,execs_169668,op_quick,pos_255,val_+2.buzz +++ b/tests/fuzzed/id_000235,sig_06,src_000005,time_37985373,execs_169668,op_quick,pos_255,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000236,sig_06,src_002128,time_39642666,execs_177607,op_quick,pos_410,val_+4.buzz b/tests/fuzzed/id_000236,sig_06,src_002128,time_39642666,execs_177607,op_quick,pos_410,val_+4.buzz index 183bfd35..ef8427a5 100644 --- a/tests/fuzzed/id_000236,sig_06,src_002128,time_39642666,execs_177607,op_quick,pos_410,val_+4.buzz +++ b/tests/fuzzed/id_000236,sig_06,src_002128,time_39642666,execs_177607,op_quick,pos_410,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/fuzzed/id_000238,sig_06,src_001952,time_40616704,execs_182234,op_quick,pos_1361,val_+4.buzz b/tests/fuzzed/id_000238,sig_06,src_001952,time_40616704,execs_182234,op_quick,pos_1361,val_+4.buzz index 022dbe9b..db1027d6 100644 --- a/tests/fuzzed/id_000238,sig_06,src_001952,time_40616704,execs_182234,op_quick,pos_1361,val_+4.buzz +++ b/tests/fuzzed/id_000238,sig_06,src_001952,time_40616704,execs_182234,op_quick,pos_1361,val_+4.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000240,sig_06,src_000019,time_46132030,execs_198251,op_quick,pos_106,val_+6.buzz b/tests/fuzzed/id_000240,sig_06,src_000019,time_46132030,execs_198251,op_quick,pos_106,val_+6.buzz index a199957c..79911e2a 100644 --- a/tests/fuzzed/id_000240,sig_06,src_000019,time_46132030,execs_198251,op_quick,pos_106,val_+6.buzz +++ b/tests/fuzzed/id_000240,sig_06,src_000019,time_46132030,execs_198251,op_quick,pos_106,val_+6.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun upvals() > fun () { final upvalue = 12; diff --git a/tests/fuzzed/id_000241,sig_06,src_000000,time_49412938,execs_213759,op_arith8,pos_362,val_+5.buzz b/tests/fuzzed/id_000241,sig_06,src_000000,time_49412938,execs_213759,op_arith8,pos_362,val_+5.buzz index 96d732b6..92e75ae6 100644 --- a/tests/fuzzed/id_000241,sig_06,src_000000,time_49412938,execs_213759,op_arith8,pos_362,val_+5.buzz +++ b/tests/fuzzed/id_000241,sig_06,src_000000,time_49412938,execs_213759,op_arith8,pos_362,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000242,sig_06,src_000000,time_49536879,execs_214311,op_arith8,pos_683,val_+26.buzz b/tests/fuzzed/id_000242,sig_06,src_000000,time_49536879,execs_214311,op_arith8,pos_683,val_+26.buzz index 4c9eaf1a..a6e41424 100644 --- a/tests/fuzzed/id_000242,sig_06,src_000000,time_49536879,execs_214311,op_arith8,pos_683,val_+26.buzz +++ b/tests/fuzzed/id_000242,sig_06,src_000000,time_49536879,execs_214311,op_arith8,pos_683,val_+26.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000243,sig_06,src_000000,time_49577095,execs_214478,op_arith8,pos_781,val_+26.buzz b/tests/fuzzed/id_000243,sig_06,src_000000,time_49577095,execs_214478,op_arith8,pos_781,val_+26.buzz index c3f2ae5d..b8d98371 100644 --- a/tests/fuzzed/id_000243,sig_06,src_000000,time_49577095,execs_214478,op_arith8,pos_781,val_+26.buzz +++ b/tests/fuzzed/id_000243,sig_06,src_000000,time_49577095,execs_214478,op_arith8,pos_781,val_+26.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000244,sig_06,src_001723,time_51459348,execs_222520,op_quick,pos_198,val_+2.buzz b/tests/fuzzed/id_000244,sig_06,src_001723,time_51459348,execs_222520,op_quick,pos_198,val_+2.buzz index c7a0246c..9b9302db 100644 --- a/tests/fuzzed/id_000244,sig_06,src_001723,time_51459348,execs_222520,op_quick,pos_198,val_+2.buzz +++ b/tests/fuzzed/id_000244,sig_06,src_001723,time_51459348,execs_222520,op_quick,pos_198,val_+2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000245,sig_06,src_001997,time_52688593,execs_227532,op_quick,pos_1189,val_+2.buzz b/tests/fuzzed/id_000245,sig_06,src_001997,time_52688593,execs_227532,op_quick,pos_1189,val_+2.buzz index de03f046..2709ae96 100644 --- a/tests/fuzzed/id_000245,sig_06,src_001997,time_52688593,execs_227532,op_quick,pos_1189,val_+2.buzz +++ b/tests/fuzzed/id_000245,sig_06,src_001997,time_52688593,execs_227532,op_quick,pos_1189,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000246,sig_06,src_001997,time_52692507,execs_227545,op_quick,pos_1202,val_+2.buzz b/tests/fuzzed/id_000246,sig_06,src_001997,time_52692507,execs_227545,op_quick,pos_1202,val_+2.buzz index fcce5022..0a97431c 100644 --- a/tests/fuzzed/id_000246,sig_06,src_001997,time_52692507,execs_227545,op_quick,pos_1202,val_+2.buzz +++ b/tests/fuzzed/id_000246,sig_06,src_001997,time_52692507,execs_227545,op_quick,pos_1202,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000247,sig_06,src_001997,time_52882604,execs_228188,op_flip1,pos_1167.buzz b/tests/fuzzed/id_000247,sig_06,src_001997,time_52882604,execs_228188,op_flip1,pos_1167.buzz index ed47e218..3208fff8 100644 --- a/tests/fuzzed/id_000247,sig_06,src_001997,time_52882604,execs_228188,op_flip1,pos_1167.buzz +++ b/tests/fuzzed/id_000247,sig_06,src_001997,time_52882604,execs_228188,op_flip1,pos_1167.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000248,sig_06,src_001997,time_52922773,execs_228312,op_flip2,pos_1187.buzz b/tests/fuzzed/id_000248,sig_06,src_001997,time_52922773,execs_228312,op_flip2,pos_1187.buzz index ff0be971..c7bc5dff 100644 --- a/tests/fuzzed/id_000248,sig_06,src_001997,time_52922773,execs_228312,op_flip2,pos_1187.buzz +++ b/tests/fuzzed/id_000248,sig_06,src_001997,time_52922773,execs_228312,op_flip2,pos_1187.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000249,sig_06,src_001997,time_52953605,execs_228408,op_flip4,pos_1167.buzz b/tests/fuzzed/id_000249,sig_06,src_001997,time_52953605,execs_228408,op_flip4,pos_1167.buzz index 131307bb..97c6b927 100644 --- a/tests/fuzzed/id_000249,sig_06,src_001997,time_52953605,execs_228408,op_flip4,pos_1167.buzz +++ b/tests/fuzzed/id_000249,sig_06,src_001997,time_52953605,execs_228408,op_flip4,pos_1167.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000250,sig_06,src_001997,time_53147299,execs_229022,op_arith8,pos_1187,val_-10.buzz b/tests/fuzzed/id_000250,sig_06,src_001997,time_53147299,execs_229022,op_arith8,pos_1187,val_-10.buzz index f694b412..e9b15e64 100644 --- a/tests/fuzzed/id_000250,sig_06,src_001997,time_53147299,execs_229022,op_arith8,pos_1187,val_-10.buzz +++ b/tests/fuzzed/id_000250,sig_06,src_001997,time_53147299,execs_229022,op_arith8,pos_1187,val_-10.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000251,sig_06,src_002280,time_53826593,execs_231465,op_quick,pos_1191,val_+6.buzz b/tests/fuzzed/id_000251,sig_06,src_002280,time_53826593,execs_231465,op_quick,pos_1191,val_+6.buzz index 6cfd7595..b5b5a212 100644 --- a/tests/fuzzed/id_000251,sig_06,src_002280,time_53826593,execs_231465,op_quick,pos_1191,val_+6.buzz +++ b/tests/fuzzed/id_000251,sig_06,src_002280,time_53826593,execs_231465,op_quick,pos_1191,val_+6.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000252,sig_06,src_002280,time_53829997,execs_231476,op_quick,pos_1202,val_+6.buzz b/tests/fuzzed/id_000252,sig_06,src_002280,time_53829997,execs_231476,op_quick,pos_1202,val_+6.buzz index bdebcad3..7e79d56e 100644 --- a/tests/fuzzed/id_000252,sig_06,src_002280,time_53829997,execs_231476,op_quick,pos_1202,val_+6.buzz +++ b/tests/fuzzed/id_000252,sig_06,src_002280,time_53829997,execs_231476,op_quick,pos_1202,val_+6.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000253,sig_06,src_002290,time_54426132,execs_233561,op_havoc,rep_1.buzz b/tests/fuzzed/id_000253,sig_06,src_002290,time_54426132,execs_233561,op_havoc,rep_1.buzz index 510c843d..d74e50e9 100644 --- a/tests/fuzzed/id_000253,sig_06,src_002290,time_54426132,execs_233561,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000253,sig_06,src_002290,time_54426132,execs_233561,op_havoc,rep_1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000254,sig_06,src_000995,time_54810724,execs_235381,op_quick,pos_122,val_+4.buzz b/tests/fuzzed/id_000254,sig_06,src_000995,time_54810724,execs_235381,op_quick,pos_122,val_+4.buzz index 79e31f73..0df3515f 100644 --- a/tests/fuzzed/id_000254,sig_06,src_000995,time_54810724,execs_235381,op_quick,pos_122,val_+4.buzz +++ b/tests/fuzzed/id_000254,sig_06,src_000995,time_54810724,execs_235381,op_quick,pos_122,val_+4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {K: D}, diff --git a/tests/fuzzed/id_000265,sig_06,src_002251,time_56396097,execs_244791,op_arith8,pos_468,val_+26.buzz b/tests/fuzzed/id_000265,sig_06,src_002251,time_56396097,execs_244791,op_arith8,pos_468,val_+26.buzz index 8d5954b7..2c8886ce 100644 --- a/tests/fuzzed/id_000265,sig_06,src_002251,time_56396097,execs_244791,op_arith8,pos_468,val_+26.buzz +++ b/tests/fuzzed/id_000265,sig_06,src_002251,time_56396097,execs_244791,op_arith8,pos_468,val_+26.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000266,sig_11,src_000737,time_57232300,execs_248805,op_quick,pos_596,val_+2.buzz b/tests/fuzzed/id_000266,sig_11,src_000737,time_57232300,execs_248805,op_quick,pos_596,val_+2.buzz index f1c73bbc..836031f2 100644 --- a/tests/fuzzed/id_000266,sig_11,src_000737,time_57232300,execs_248805,op_quick,pos_596,val_+2.buzz +++ b/tests/fuzzed/id_000266,sig_11,src_000737,time_57232300,execs_248805,op_quick,pos_596,val_+2.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000267,sig_06,src_000032,time_57646435,execs_250539,op_inf,rep_5.buzz b/tests/fuzzed/id_000267,sig_06,src_000032,time_57646435,execs_250539,op_inf,rep_5.buzz index 6cb1e987..255569a4 100644 --- a/tests/fuzzed/id_000267,sig_06,src_000032,time_57646435,execs_250539,op_inf,rep_5.buzz +++ b/tests/fuzzed/id_000267,sig_06,src_000032,time_57646435,execs_250539,op_inf,rep_5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000268,sig_06,src_000032,time_57900615,execs_251516,op_quick,pos_762,val_+5.buzz b/tests/fuzzed/id_000268,sig_06,src_000032,time_57900615,execs_251516,op_quick,pos_762,val_+5.buzz index 80db427c..a79f6dc0 100644 --- a/tests/fuzzed/id_000268,sig_06,src_000032,time_57900615,execs_251516,op_quick,pos_762,val_+5.buzz +++ b/tests/fuzzed/id_000268,sig_06,src_000032,time_57900615,execs_251516,op_quick,pos_762,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000269,sig_06,src_000032,time_58080994,execs_252235,op_quick,pos_1347,val_+5.buzz b/tests/fuzzed/id_000269,sig_06,src_000032,time_58080994,execs_252235,op_quick,pos_1347,val_+5.buzz index ffd517ee..671db815 100644 --- a/tests/fuzzed/id_000269,sig_06,src_000032,time_58080994,execs_252235,op_quick,pos_1347,val_+5.buzz +++ b/tests/fuzzed/id_000269,sig_06,src_000032,time_58080994,execs_252235,op_quick,pos_1347,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000271,sig_06,src_000032,time_58585555,execs_254223,op_havoc,rep_2.buzz b/tests/fuzzed/id_000271,sig_06,src_000032,time_58585555,execs_254223,op_havoc,rep_2.buzz index c8bb726a..42beb26e 100644 --- a/tests/fuzzed/id_000271,sig_06,src_000032,time_58585555,execs_254223,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000271,sig_06,src_000032,time_58585555,execs_254223,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Wrapping call inside complex expressions" { final map = { diff --git a/tests/fuzzed/id_000272,sig_06,src_000032,time_58663945,execs_254571,op_havoc,rep_2.buzz b/tests/fuzzed/id_000272,sig_06,src_000032,time_58663945,execs_254571,op_havoc,rep_2.buzz index 86094d40..9d2efe03 100644 --- a/tests/fuzzed/id_000272,sig_06,src_000032,time_58663945,execs_254571,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000272,sig_06,src_000032,time_58663945,execs_254571,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000275,sig_06,src_000032,time_59042763,execs_256202,op_havoc,rep_4.buzz b/tests/fuzzed/id_000275,sig_06,src_000032,time_59042763,execs_256202,op_havoc,rep_4.buzz index 79bff6b6..59a4d39c 100644 --- a/tests/fuzzed/id_000275,sig_06,src_000032,time_59042763,execs_256202,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000275,sig_06,src_000032,time_59042763,execs_256202,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000276,sig_06,src_000032,time_59124537,execs_256553,op_havoc,rep_2.buzz b/tests/fuzzed/id_000276,sig_06,src_000032,time_59124537,execs_256553,op_havoc,rep_2.buzz index 15367be5..df75f2c0 100644 --- a/tests/fuzzed/id_000276,sig_06,src_000032,time_59124537,execs_256553,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000276,sig_06,src_000032,time_59124537,execs_256553,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000277,sig_06,src_000032,time_59235059,execs_257029,op_havoc,rep_1.buzz b/tests/fuzzed/id_000277,sig_06,src_000032,time_59235059,execs_257029,op_havoc,rep_1.buzz index 0dee77a7..7346bf90 100644 --- a/tests/fuzzed/id_000277,sig_06,src_000032,time_59235059,execs_257029,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000277,sig_06,src_000032,time_59235059,execs_257029,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000278,sig_06,src_000032,time_59358971,execs_257542,op_havoc,rep_1.buzz b/tests/fuzzed/id_000278,sig_06,src_000032,time_59358971,execs_257542,op_havoc,rep_1.buzz index 1ff75393..92eedcc6 100644 --- a/tests/fuzzed/id_000278,sig_06,src_000032,time_59358971,execs_257542,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000278,sig_06,src_000032,time_59358971,execs_257542,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000280,sig_06,src_002390,time_60321735,execs_261733,op_inf,rep_1.buzz b/tests/fuzzed/id_000280,sig_06,src_002390,time_60321735,execs_261733,op_inf,rep_1.buzz index 9099318a..f2c998ef 100644 --- a/tests/fuzzed/id_000280,sig_06,src_002390,time_60321735,execs_261733,op_inf,rep_1.buzz +++ b/tests/fuzzed/id_000280,sig_06,src_002390,time_60321735,execs_261733,op_inf,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > vwid !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000282,sig_06,src_002424,time_61734115,execs_267045,op_quick,pos_1356,val_+7.buzz b/tests/fuzzed/id_000282,sig_06,src_002424,time_61734115,execs_267045,op_quick,pos_1356,val_+7.buzz index 553ae16a..16b8e349 100644 --- a/tests/fuzzed/id_000282,sig_06,src_002424,time_61734115,execs_267045,op_quick,pos_1356,val_+7.buzz +++ b/tests/fuzzed/id_000282,sig_06,src_002424,time_61734115,execs_267045,op_quick,pos_1356,val_+7.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > vwid !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000283,sig_11,src_000059,time_62479041,execs_270064,op_quick,pos_265,val_+11.buzz b/tests/fuzzed/id_000283,sig_11,src_000059,time_62479041,execs_270064,op_quick,pos_265,val_+11.buzz index cdc26b81..bb6c5f74 100644 --- a/tests/fuzzed/id_000283,sig_11,src_000059,time_62479041,execs_270064,op_quick,pos_265,val_+11.buzz +++ b/tests/fuzzed/id_000283,sig_11,src_000059,time_62479041,execs_270064,op_quick,pos_265,val_+11.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "labeled break" { var i = 0; diff --git a/tests/fuzzed/id_000285,sig_06,src_000002,time_64028189,execs_277373,op_arith8,pos_1097,val_+28.buzz b/tests/fuzzed/id_000285,sig_06,src_000002,time_64028189,execs_277373,op_arith8,pos_1097,val_+28.buzz index 426a1701..49b718b6 100644 --- a/tests/fuzzed/id_000285,sig_06,src_000002,time_64028189,execs_277373,op_arith8,pos_1097,val_+28.buzz +++ b/tests/fuzzed/id_000285,sig_06,src_000002,time_64028189,execs_277373,op_arith8,pos_1097,val_+28.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000286,sig_06,src_000002,time_64274306,execs_278459,op_havoc,rep_2.buzz b/tests/fuzzed/id_000286,sig_06,src_000002,time_64274306,execs_278459,op_havoc,rep_2.buzz index 1a7f48f1..b07c268f 100644 --- a/tests/fuzzed/id_000286,sig_06,src_000002,time_64274306,execs_278459,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000286,sig_06,src_000002,time_64274306,execs_278459,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if statement" { if (2 > 1) { diff --git a/tests/fuzzed/id_000287,sig_06,src_000053,time_66983681,execs_290801,op_quick,pos_299.buzz b/tests/fuzzed/id_000287,sig_06,src_000053,time_66983681,execs_290801,op_quick,pos_299.buzz index 188070c7..8e368e4b 100644 --- a/tests/fuzzed/id_000287,sig_06,src_000053,time_66983681,execs_290801,op_quick,pos_299.buzz +++ b/tests/fuzzed/id_000287,sig_06,src_000053,time_66983681,execs_290801,op_quick,pos_299.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { if (false) { diff --git a/tests/fuzzed/id_000289,sig_06,src_000039,time_68762636,execs_300111,op_quick,pos_331.buzz b/tests/fuzzed/id_000289,sig_06,src_000039,time_68762636,execs_300111,op_quick,pos_331.buzz index 79ad4038..6127b1b5 100644 --- a/tests/fuzzed/id_000289,sig_06,src_000039,time_68762636,execs_300111,op_quick,pos_331.buzz +++ b/tests/fuzzed/id_000289,sig_06,src_000039,time_68762636,execs_300111,op_quick,pos_331.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000290,sig_06,src_000039,time_68893120,execs_300650,op_quick,pos_868.buzz b/tests/fuzzed/id_000290,sig_06,src_000039,time_68893120,execs_300650,op_quick,pos_868.buzz index f4c783f4..5d3c1a94 100644 --- a/tests/fuzzed/id_000290,sig_06,src_000039,time_68893120,execs_300650,op_quick,pos_868.buzz +++ b/tests/fuzzed/id_000290,sig_06,src_000039,time_68893120,execs_300650,op_quick,pos_868.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000291,sig_06,src_000039,time_68994477,execs_301064,op_quick,pos_1257.buzz b/tests/fuzzed/id_000291,sig_06,src_000039,time_68994477,execs_301064,op_quick,pos_1257.buzz index aa5e6d1b..0ebd91d2 100644 --- a/tests/fuzzed/id_000291,sig_06,src_000039,time_68994477,execs_301064,op_quick,pos_1257.buzz +++ b/tests/fuzzed/id_000291,sig_06,src_000039,time_68994477,execs_301064,op_quick,pos_1257.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun willFail() > void !> str { throw "Yolo"; diff --git a/tests/fuzzed/id_000293,sig_06,src_001816,time_72343382,execs_315245,op_arith8,pos_458,val_+28.buzz b/tests/fuzzed/id_000293,sig_06,src_001816,time_72343382,execs_315245,op_arith8,pos_458,val_+28.buzz index 43fbaf3c..12151417 100644 --- a/tests/fuzzed/id_000293,sig_06,src_001816,time_72343382,execs_315245,op_arith8,pos_458,val_+28.buzz +++ b/tests/fuzzed/id_000293,sig_06,src_001816,time_72343382,execs_315245,op_arith8,pos_458,val_+28.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "continue properly jumps and closes scope" { foreach (value in 1..5) { diff --git a/tests/fuzzed/id_000294,sig_06,src_000057,time_72638050,execs_316690,op_quick,pos_248.buzz b/tests/fuzzed/id_000294,sig_06,src_000057,time_72638050,execs_316690,op_quick,pos_248.buzz index 2f072b50..6fbfa4c1 100644 --- a/tests/fuzzed/id_000294,sig_06,src_000057,time_72638050,execs_316690,op_quick,pos_248.buzz +++ b/tests/fuzzed/id_000294,sig_06,src_000057,time_72638050,execs_316690,op_quick,pos_248.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "block expression" { final value = from { diff --git a/tests/fuzzed/id_000295,sig_06,src_000057,time_72724520,execs_317104,op_arith8,pos_137,val_+5.buzz b/tests/fuzzed/id_000295,sig_06,src_000057,time_72724520,execs_317104,op_arith8,pos_137,val_+5.buzz index 100d81e9..274fe0a1 100644 --- a/tests/fuzzed/id_000295,sig_06,src_000057,time_72724520,execs_317104,op_arith8,pos_137,val_+5.buzz +++ b/tests/fuzzed/id_000295,sig_06,src_000057,time_72724520,execs_317104,op_arith8,pos_137,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "block expression" { final value = from { diff --git a/tests/fuzzed/id_000298,sig_06,src_000040,time_74464538,execs_324402,op_quick,pos_78.buzz b/tests/fuzzed/id_000298,sig_06,src_000040,time_74464538,execs_324402,op_quick,pos_78.buzz index 16fdc0bf..ebe1c149 100644 --- a/tests/fuzzed/id_000298,sig_06,src_000040,time_74464538,execs_324402,op_quick,pos_78.buzz +++ b/tests/fuzzed/id_000298,sig_06,src_000040,time_74464538,execs_324402,op_quick,pos_78.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "If arrow" { final opt: int? = null; diff --git a/tests/fuzzed/id_000299,sig_06,src_002271,time_76032260,execs_330699,op_quick,pos_1186.buzz b/tests/fuzzed/id_000299,sig_06,src_002271,time_76032260,execs_330699,op_quick,pos_1186.buzz index 147fdbb3..153ed1e7 100644 --- a/tests/fuzzed/id_000299,sig_06,src_002271,time_76032260,execs_330699,op_quick,pos_1186.buzz +++ b/tests/fuzzed/id_000299,sig_06,src_002271,time_76032260,execs_330699,op_quick,pos_1186.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000300,sig_06,src_002271,time_76033152,execs_330702,op_quick,pos_1189.buzz b/tests/fuzzed/id_000300,sig_06,src_002271,time_76033152,execs_330702,op_quick,pos_1189.buzz index d3fcc82e..a1434216 100644 --- a/tests/fuzzed/id_000300,sig_06,src_002271,time_76033152,execs_330702,op_quick,pos_1189.buzz +++ b/tests/fuzzed/id_000300,sig_06,src_002271,time_76033152,execs_330702,op_quick,pos_1189.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000301,sig_06,src_002271,time_76033415,execs_330703,op_quick,pos_1190.buzz b/tests/fuzzed/id_000301,sig_06,src_002271,time_76033415,execs_330703,op_quick,pos_1190.buzz index bef87944..502bf0a9 100644 --- a/tests/fuzzed/id_000301,sig_06,src_002271,time_76033415,execs_330703,op_quick,pos_1190.buzz +++ b/tests/fuzzed/id_000301,sig_06,src_002271,time_76033415,execs_330703,op_quick,pos_1190.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000302,sig_06,src_002271,time_76038104,execs_330717,op_quick,pos_1204.buzz b/tests/fuzzed/id_000302,sig_06,src_002271,time_76038104,execs_330717,op_quick,pos_1204.buzz index 97207ffe..d9e35fe2 100644 --- a/tests/fuzzed/id_000302,sig_06,src_002271,time_76038104,execs_330717,op_quick,pos_1204.buzz +++ b/tests/fuzzed/id_000302,sig_06,src_002271,time_76038104,execs_330717,op_quick,pos_1204.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000303,sig_06,src_002271,time_76341093,execs_331567,op_arith8,pos_827,val_+5.buzz b/tests/fuzzed/id_000303,sig_06,src_002271,time_76341093,execs_331567,op_arith8,pos_827,val_+5.buzz index 1b09e2d8..3e76d930 100644 --- a/tests/fuzzed/id_000303,sig_06,src_002271,time_76341093,execs_331567,op_arith8,pos_827,val_+5.buzz +++ b/tests/fuzzed/id_000303,sig_06,src_002271,time_76341093,execs_331567,op_arith8,pos_827,val_+5.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000304,sig_06,src_001333,time_79400261,execs_342468,op_quick,pos_232.buzz b/tests/fuzzed/id_000304,sig_06,src_001333,time_79400261,execs_342468,op_quick,pos_232.buzz index ce325779..59ad2694 100644 --- a/tests/fuzzed/id_000304,sig_06,src_001333,time_79400261,execs_342468,op_quick,pos_232.buzz +++ b/tests/fuzzed/id_000304,sig_06,src_001333,time_79400261,execs_342468,op_quick,pos_232.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000305,sig_06,src_001957,time_83462475,execs_359210,op_quick,pos_1361.buzz b/tests/fuzzed/id_000305,sig_06,src_001957,time_83462475,execs_359210,op_quick,pos_1361.buzz index a3253d8f..7b587415 100644 --- a/tests/fuzzed/id_000305,sig_06,src_001957,time_83462475,execs_359210,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000305,sig_06,src_001957,time_83462475,execs_359210,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000306,sig_06,src_000058,time_84869130,execs_364710,op_quick,pos_60.buzz b/tests/fuzzed/id_000306,sig_06,src_000058,time_84869130,execs_364710,op_quick,pos_60.buzz index f7d190ce..f7fb24b2 100644 --- a/tests/fuzzed/id_000306,sig_06,src_000058,time_84869130,execs_364710,op_quick,pos_60.buzz +++ b/tests/fuzzed/id_000306,sig_06,src_000058,time_84869130,execs_364710,op_quick,pos_60.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun mul(a: int, b: int) > int { return a . b; diff --git a/tests/fuzzed/id_000307,sig_06,src_000058,time_84908720,execs_364893,op_quick,pos_231.buzz b/tests/fuzzed/id_000307,sig_06,src_000058,time_84908720,execs_364893,op_quick,pos_231.buzz index c915e109..15c9fecf 100644 --- a/tests/fuzzed/id_000307,sig_06,src_000058,time_84908720,execs_364893,op_quick,pos_231.buzz +++ b/tests/fuzzed/id_000307,sig_06,src_000058,time_84908720,execs_364893,op_quick,pos_231.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun mul(a: int, b: int) > int { return a * b; diff --git a/tests/fuzzed/id_000308,sig_06,src_000058,time_84983967,execs_365215,op_quick,pos_552.buzz b/tests/fuzzed/id_000308,sig_06,src_000058,time_84983967,execs_365215,op_quick,pos_552.buzz index 4aee3642..4c5cb175 100644 --- a/tests/fuzzed/id_000308,sig_06,src_000058,time_84983967,execs_365215,op_quick,pos_552.buzz +++ b/tests/fuzzed/id_000308,sig_06,src_000058,time_84983967,execs_365215,op_quick,pos_552.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun mul(a: int, b: int) > int { return a * b; diff --git a/tests/fuzzed/id_000309,sig_06,src_002554,time_86923124,execs_373881,op_havoc,rep_2.buzz b/tests/fuzzed/id_000309,sig_06,src_002554,time_86923124,execs_373881,op_havoc,rep_2.buzz index 23f324b1..ad3afe4f 100644 --- a/tests/fuzzed/id_000309,sig_06,src_002554,time_86923124,execs_373881,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000309,sig_06,src_002554,time_86923124,execs_373881,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/fuzzed/id_000310,sig_06,src_001358,time_87910948,execs_378156,op_quick,pos_290.buzz b/tests/fuzzed/id_000310,sig_06,src_001358,time_87910948,execs_378156,op_quick,pos_290.buzz index 226d597b..a1ccdd90 100644 --- a/tests/fuzzed/id_000310,sig_06,src_001358,time_87910948,execs_378156,op_quick,pos_290.buzz +++ b/tests/fuzzed/id_000310,sig_06,src_001358,time_87910948,execs_378156,op_quick,pos_290.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000311,sig_06,src_002406,time_88382776,execs_380377,op_flip32,pos_291.buzz b/tests/fuzzed/id_000311,sig_06,src_002406,time_88382776,execs_380377,op_flip32,pos_291.buzz index 7fdfa78b..9c1136b9 100644 --- a/tests/fuzzed/id_000311,sig_06,src_002406,time_88382776,execs_380377,op_flip32,pos_291.buzz +++ b/tests/fuzzed/id_000311,sig_06,src_002406,time_88382776,execs_380377,op_flip32,pos_291.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000312,sig_06,src_002406,time_88391762,execs_380418,op_arith8,pos_291,val_-27.buzz b/tests/fuzzed/id_000312,sig_06,src_002406,time_88391762,execs_380418,op_arith8,pos_291,val_-27.buzz index 645413bf..786ffff2 100644 --- a/tests/fuzzed/id_000312,sig_06,src_002406,time_88391762,execs_380418,op_arith8,pos_291,val_-27.buzz +++ b/tests/fuzzed/id_000312,sig_06,src_002406,time_88391762,execs_380418,op_arith8,pos_291,val_-27.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000313,sig_06,src_000016,time_89328446,execs_384726,op_quick,pos_270.buzz b/tests/fuzzed/id_000313,sig_06,src_000016,time_89328446,execs_384726,op_quick,pos_270.buzz index 4433cb29..a64d4f3a 100644 --- a/tests/fuzzed/id_000313,sig_06,src_000016,time_89328446,execs_384726,op_quick,pos_270.buzz +++ b/tests/fuzzed/id_000313,sig_06,src_000016,time_89328446,execs_384726,op_quick,pos_270.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "for loop" { var sum = 0; diff --git a/tests/fuzzed/id_000314,sig_06,src_002297,time_90703853,execs_390606,op_quick,pos_1260.buzz b/tests/fuzzed/id_000314,sig_06,src_002297,time_90703853,execs_390606,op_quick,pos_1260.buzz index bc9dc0ef..35eaa120 100644 --- a/tests/fuzzed/id_000314,sig_06,src_002297,time_90703853,execs_390606,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000314,sig_06,src_002297,time_90703853,execs_390606,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000315,sig_06,src_002297,time_90997899,execs_391555,op_havoc,rep_5.buzz b/tests/fuzzed/id_000315,sig_06,src_002297,time_90997899,execs_391555,op_havoc,rep_5.buzz index a91db577..d0afa831 100644 --- a/tests/fuzzed/id_000315,sig_06,src_002297,time_90997899,execs_391555,op_havoc,rep_5.buzz +++ b/tests/fuzzed/id_000315,sig_06,src_002297,time_90997899,execs_391555,op_havoc,rep_5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; import "dwbug"; object A {} diff --git a/tests/fuzzed/id_000316,sig_06,src_001946,time_92303472,execs_397259,op_quick,pos_1187.buzz b/tests/fuzzed/id_000316,sig_06,src_001946,time_92303472,execs_397259,op_quick,pos_1187.buzz index a260fd4f..741ba480 100644 --- a/tests/fuzzed/id_000316,sig_06,src_001946,time_92303472,execs_397259,op_quick,pos_1187.buzz +++ b/tests/fuzzed/id_000316,sig_06,src_001946,time_92303472,execs_397259,op_quick,pos_1187.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000317,sig_06,src_002252,time_93260094,execs_401419,op_arith8,pos_464,val_+26.buzz b/tests/fuzzed/id_000317,sig_06,src_002252,time_93260094,execs_401419,op_arith8,pos_464,val_+26.buzz index 0e442814..ec678500 100644 --- a/tests/fuzzed/id_000317,sig_06,src_002252,time_93260094,execs_401419,op_arith8,pos_464,val_+26.buzz +++ b/tests/fuzzed/id_000317,sig_06,src_002252,time_93260094,execs_401419,op_arith8,pos_464,val_+26.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello w"; diff --git a/tests/fuzzed/id_000318,sig_06,src_002528,time_94833516,execs_411321,op_quick,pos_88.buzz b/tests/fuzzed/id_000318,sig_06,src_002528,time_94833516,execs_411321,op_quick,pos_88.buzz index fd1b6e4a..fdccdbdd 100644 --- a/tests/fuzzed/id_000318,sig_06,src_002528,time_94833516,execs_411321,op_quick,pos_88.buzz +++ b/tests/fuzzed/id_000318,sig_06,src_002528,time_94833516,execs_411321,op_quick,pos_88.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000319,sig_06,src_002528,time_95632731,execs_413985,op_havoc,rep_3.buzz b/tests/fuzzed/id_000319,sig_06,src_002528,time_95632731,execs_413985,op_havoc,rep_3.buzz index e46de714..0437902c 100644 --- a/tests/fuzzed/id_000319,sig_06,src_002528,time_95632731,execs_413985,op_havoc,rep_3.buzz +++ b/tests/fuzzed/id_000319,sig_06,src_002528,time_95632731,execs_413985,op_havoc,rep_3.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000320,sig_06,src_002283,time_97688567,execs_423495,op_quick,pos_1361.buzz b/tests/fuzzed/id_000320,sig_06,src_002283,time_97688567,execs_423495,op_quick,pos_1361.buzz index fbde1f68..ea1e6014 100644 --- a/tests/fuzzed/id_000320,sig_06,src_002283,time_97688567,execs_423495,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000320,sig_06,src_002283,time_97688567,execs_423495,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000321,sig_06,src_000755,time_98745206,execs_427456,op_quick,pos_113.buzz b/tests/fuzzed/id_000321,sig_06,src_000755,time_98745206,execs_427456,op_quick,pos_113.buzz index 0575de05..e7276d34 100644 --- a/tests/fuzzed/id_000321,sig_06,src_000755,time_98745206,execs_427456,op_quick,pos_113.buzz +++ b/tests/fuzzed/id_000321,sig_06,src_000755,time_98745206,execs_427456,op_quick,pos_113.buzz @@ -1,5 +1,5 @@ import "Std"; -import "gc"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000322,sig_06,src_000035,time_99732791,execs_431227,op_quick,pos_510.buzz b/tests/fuzzed/id_000322,sig_06,src_000035,time_99732791,execs_431227,op_quick,pos_510.buzz index 75290e26..134500c2 100644 --- a/tests/fuzzed/id_000322,sig_06,src_000035,time_99732791,execs_431227,op_quick,pos_510.buzz +++ b/tests/fuzzed/id_000322,sig_06,src_000035,time_99732791,execs_431227,op_quick,pos_510.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun fibonacci(n: int) > void *> int? { var n1 = 0; diff --git a/tests/fuzzed/id_000323,sig_06,src_000035,time_99796047,execs_431508,op_quick,pos_779.buzz b/tests/fuzzed/id_000323,sig_06,src_000035,time_99796047,execs_431508,op_quick,pos_779.buzz index 68fe3d27..51b9993c 100644 --- a/tests/fuzzed/id_000323,sig_06,src_000035,time_99796047,execs_431508,op_quick,pos_779.buzz +++ b/tests/fuzzed/id_000323,sig_06,src_000035,time_99796047,execs_431508,op_quick,pos_779.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun fibonacci(n: int) > void *> int? { var n1 = 0; diff --git a/tests/fuzzed/id_000324,sig_06,src_001337,time_100748507,execs_435529,op_quick,pos_1115.buzz b/tests/fuzzed/id_000324,sig_06,src_001337,time_100748507,execs_435529,op_quick,pos_1115.buzz index da2c3ab4..7777f716 100644 --- a/tests/fuzzed/id_000324,sig_06,src_001337,time_100748507,execs_435529,op_quick,pos_1115.buzz +++ b/tests/fuzzed/id_000324,sig_06,src_001337,time_100748507,execs_435529,op_quick,pos_1115.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000325,sig_06,src_001337,time_100811010,execs_435723,op_quick,pos_1309.buzz b/tests/fuzzed/id_000325,sig_06,src_001337,time_100811010,execs_435723,op_quick,pos_1309.buzz index 6a0b07bf..c688525c 100644 --- a/tests/fuzzed/id_000325,sig_06,src_001337,time_100811010,execs_435723,op_quick,pos_1309.buzz +++ b/tests/fuzzed/id_000325,sig_06,src_001337,time_100811010,execs_435723,op_quick,pos_1309.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000326,sig_06,src_000038,time_104654402,execs_451921,op_quick,pos_206.buzz b/tests/fuzzed/id_000326,sig_06,src_000038,time_104654402,execs_451921,op_quick,pos_206.buzz index d24df7c7..110ab039 100644 --- a/tests/fuzzed/id_000326,sig_06,src_000038,time_104654402,execs_451921,op_quick,pos_206.buzz +++ b/tests/fuzzed/id_000326,sig_06,src_000038,time_104654402,execs_451921,op_quick,pos_206.buzz @@ -1,6 +1,6 @@ -import "std"; -import "tests/utils/import-b"; -import "tests/utils/import-a"; +import "buzz:std"; +import "../utils/import-b"; +import "../utils/import-a"; test "Mutual import" { std\print("t: {a\Hello}"); diff --git a/tests/fuzzed/id_000327,sig_06,src_000038,time_104943562,execs_452954,op_havoc,rep_1.buzz b/tests/fuzzed/id_000327,sig_06,src_000038,time_104943562,execs_452954,op_havoc,rep_1.buzz index 7b3b0079..f81195bb 100644 --- a/tests/fuzzed/id_000327,sig_06,src_000038,time_104943562,execs_452954,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000327,sig_06,src_000038,time_104943562,execs_452954,op_havoc,rep_1.buzz @@ -1,6 +1,6 @@ -import "std"; -import "tests/utils/import-b"; -import "tests/utils/import-a"; +import "buzz:std"; +import "../utils/import-b"; +import "../utils/import-a"; test "Mutual import" { std\print("t: {a\Hello}"); diff --git a/tests/fuzzed/id_000328,sig_06,src_002592,time_105717054,execs_455456,op_quick,pos_1260.buzz b/tests/fuzzed/id_000328,sig_06,src_002592,time_105717054,execs_455456,op_quick,pos_1260.buzz index b6ef709c..3138c695 100644 --- a/tests/fuzzed/id_000328,sig_06,src_002592,time_105717054,execs_455456,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000328,sig_06,src_002592,time_105717054,execs_455456,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000329,sig_06,src_002587,time_110943511,execs_477593,op_arith8,pos_1166,val_+14.buzz b/tests/fuzzed/id_000329,sig_06,src_002587,time_110943511,execs_477593,op_arith8,pos_1166,val_+14.buzz index ca2766d0..9d41dd7e 100644 --- a/tests/fuzzed/id_000329,sig_06,src_002587,time_110943511,execs_477593,op_arith8,pos_1166,val_+14.buzz +++ b/tests/fuzzed/id_000329,sig_06,src_002587,time_110943511,execs_477593,op_arith8,pos_1166,val_+14.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000330,sig_06,src_002665,time_111703982,execs_480343,op_quick,pos_1362.buzz b/tests/fuzzed/id_000330,sig_06,src_002665,time_111703982,execs_480343,op_quick,pos_1362.buzz index 87c73752..8631b3a7 100644 --- a/tests/fuzzed/id_000330,sig_06,src_002665,time_111703982,execs_480343,op_quick,pos_1362.buzz +++ b/tests/fuzzed/id_000330,sig_06,src_002665,time_111703982,execs_480343,op_quick,pos_1362.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000331,sig_06,src_002665,time_111742104,execs_480469,op_quick,pos_1488.buzz b/tests/fuzzed/id_000331,sig_06,src_002665,time_111742104,execs_480469,op_quick,pos_1488.buzz index f3f312d2..f6ad8d0c 100644 --- a/tests/fuzzed/id_000331,sig_06,src_002665,time_111742104,execs_480469,op_quick,pos_1488.buzz +++ b/tests/fuzzed/id_000331,sig_06,src_002665,time_111742104,execs_480469,op_quick,pos_1488.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000332,sig_06,src_002286,time_112340414,execs_482618,op_quick,pos_956.buzz b/tests/fuzzed/id_000332,sig_06,src_002286,time_112340414,execs_482618,op_quick,pos_956.buzz index 6a5117e9..cbaaaab8 100644 --- a/tests/fuzzed/id_000332,sig_06,src_002286,time_112340414,execs_482618,op_quick,pos_956.buzz +++ b/tests/fuzzed/id_000332,sig_06,src_002286,time_112340414,execs_482618,op_quick,pos_956.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000333,sig_06,src_002286,time_112413712,execs_482862,op_quick,pos_1188.buzz b/tests/fuzzed/id_000333,sig_06,src_002286,time_112413712,execs_482862,op_quick,pos_1188.buzz index 217010ca..2b1bb860 100644 --- a/tests/fuzzed/id_000333,sig_06,src_002286,time_112413712,execs_482862,op_quick,pos_1188.buzz +++ b/tests/fuzzed/id_000333,sig_06,src_002286,time_112413712,execs_482862,op_quick,pos_1188.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000334,sig_06,src_002673,time_113043394,execs_485148,op_quick,pos_357.buzz b/tests/fuzzed/id_000334,sig_06,src_002673,time_113043394,execs_485148,op_quick,pos_357.buzz index b48fe682..24cc1e47 100644 --- a/tests/fuzzed/id_000334,sig_06,src_002673,time_113043394,execs_485148,op_quick,pos_357.buzz +++ b/tests/fuzzed/id_000334,sig_06,src_002673,time_113043394,execs_485148,op_quick,pos_357.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000335,sig_06,src_002407,time_114693274,execs_491945,op_quick,pos_2001.buzz b/tests/fuzzed/id_000335,sig_06,src_002407,time_114693274,execs_491945,op_quick,pos_2001.buzz index df47924c..e6bcab48 100644 --- a/tests/fuzzed/id_000335,sig_06,src_002407,time_114693274,execs_491945,op_quick,pos_2001.buzz +++ b/tests/fuzzed/id_000335,sig_06,src_002407,time_114693274,execs_491945,op_quick,pos_2001.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000336,sig_06,src_002407,time_114757430,execs_492186,op_quick,pos_2242.buzz b/tests/fuzzed/id_000336,sig_06,src_002407,time_114757430,execs_492186,op_quick,pos_2242.buzz index 714039c1..40dc5e66 100644 --- a/tests/fuzzed/id_000336,sig_06,src_002407,time_114757430,execs_492186,op_quick,pos_2242.buzz +++ b/tests/fuzzed/id_000336,sig_06,src_002407,time_114757430,execs_492186,op_quick,pos_2242.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000337,sig_06,src_002407,time_114778052,execs_492262,op_flip32,pos_2243.buzz b/tests/fuzzed/id_000337,sig_06,src_002407,time_114778052,execs_492262,op_flip32,pos_2243.buzz index b2544850..cfa25481 100644 --- a/tests/fuzzed/id_000337,sig_06,src_002407,time_114778052,execs_492262,op_flip32,pos_2243.buzz +++ b/tests/fuzzed/id_000337,sig_06,src_002407,time_114778052,execs_492262,op_flip32,pos_2243.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000339,sig_06,src_002407,time_114839245,execs_492527,op_havoc,rep_10.buzz b/tests/fuzzed/id_000339,sig_06,src_002407,time_114839245,execs_492527,op_havoc,rep_10.buzz index e2c9ef7d..d6fd51ba 100644 --- a/tests/fuzzed/id_000339,sig_06,src_002407,time_114839245,execs_492527,op_havoc,rep_10.buzz +++ b/tests/fuzzed/id_000339,sig_06,src_002407,time_114839245,execs_492527,op_havoc,rep_10.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yiediscarding valuenullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000340,sig_06,src_002542,time_116648763,execs_499499,op_quick,pos_1260.buzz b/tests/fuzzed/id_000340,sig_06,src_002542,time_116648763,execs_499499,op_quick,pos_1260.buzz index fa6c2214..8928a5dd 100644 --- a/tests/fuzzed/id_000340,sig_06,src_002542,time_116648763,execs_499499,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000340,sig_06,src_002542,time_116648763,execs_499499,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000341,sig_06,src_002715,time_119774513,execs_510315,op_quick,pos_1274.buzz b/tests/fuzzed/id_000341,sig_06,src_002715,time_119774513,execs_510315,op_quick,pos_1274.buzz index 4768142f..b2b81ad7 100644 --- a/tests/fuzzed/id_000341,sig_06,src_002715,time_119774513,execs_510315,op_quick,pos_1274.buzz +++ b/tests/fuzzed/id_000341,sig_06,src_002715,time_119774513,execs_510315,op_quick,pos_1274.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000342,sig_06,src_000024,time_120510785,execs_513697,op_inf,rep_11.buzz b/tests/fuzzed/id_000342,sig_06,src_000024,time_120510785,execs_513697,op_inf,rep_11.buzz index 5ee77b5e..f5879557 100644 --- a/tests/fuzzed/id_000342,sig_06,src_000024,time_120510785,execs_513697,op_inf,rep_11.buzz +++ b/tests/fuzzed/id_000342,sig_06,src_000024,time_120510785,execs_513697,op_inf,rep_11.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000343,sig_06,src_000024,time_120513847,execs_513711,op_inf,rep_11.buzz b/tests/fuzzed/id_000343,sig_06,src_000024,time_120513847,execs_513711,op_inf,rep_11.buzz index b2a4cb7f..91c538f2 100644 --- a/tests/fuzzed/id_000343,sig_06,src_000024,time_120513847,execs_513711,op_inf,rep_11.buzz +++ b/tests/fuzzed/id_000343,sig_06,src_000024,time_120513847,execs_513711,op_inf,rep_11.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int = 12, father: str?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000344,sig_06,src_000963,time_121066290,execs_516173,op_quick,pos_187.buzz b/tests/fuzzed/id_000344,sig_06,src_000963,time_121066290,execs_516173,op_quick,pos_187.buzz index 4fbdec5f..d95364f5 100644 --- a/tests/fuzzed/id_000344,sig_06,src_000963,time_121066290,execs_516173,op_quick,pos_187.buzz +++ b/tests/fuzzed/id_000344,sig_06,src_000963,time_121066290,execs_516173,op_quick,pos_187.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Payload:: { data: mut {V: V}, diff --git a/tests/fuzzed/id_000345,sig_06,src_002185,time_122760443,execs_522183,op_quick,pos_1361.buzz b/tests/fuzzed/id_000345,sig_06,src_002185,time_122760443,execs_522183,op_quick,pos_1361.buzz index f954ea8a..1296a26b 100644 --- a/tests/fuzzed/id_000345,sig_06,src_002185,time_122760443,execs_522183,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000345,sig_06,src_002185,time_122760443,execs_522183,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000346,sig_06,src_002415,time_123625396,execs_525714,op_quick,pos_1415.buzz b/tests/fuzzed/id_000346,sig_06,src_002415,time_123625396,execs_525714,op_quick,pos_1415.buzz index 81fe7b6c..97295fb6 100644 --- a/tests/fuzzed/id_000346,sig_06,src_002415,time_123625396,execs_525714,op_quick,pos_1415.buzz +++ b/tests/fuzzed/id_000346,sig_06,src_002415,time_123625396,execs_525714,op_quick,pos_1415.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000347,sig_06,src_002415,time_123719386,execs_526124,op_arith8,pos_414,val_+5.buzz b/tests/fuzzed/id_000347,sig_06,src_002415,time_123719386,execs_526124,op_arith8,pos_414,val_+5.buzz index 407e55d9..ea7b6b23 100644 --- a/tests/fuzzed/id_000347,sig_06,src_002415,time_123719386,execs_526124,op_arith8,pos_414,val_+5.buzz +++ b/tests/fuzzed/id_000347,sig_06,src_002415,time_123719386,execs_526124,op_arith8,pos_414,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000348,sig_06,src_000047,time_124013546,execs_527527,op_quick,pos_92.buzz b/tests/fuzzed/id_000348,sig_06,src_000047,time_124013546,execs_527527,op_quick,pos_92.buzz index 9c225345..ef0d6e0d 100644 --- a/tests/fuzzed/id_000348,sig_06,src_000047,time_124013546,execs_527527,op_quick,pos_92.buzz +++ b/tests/fuzzed/id_000348,sig_06,src_000047,time_124013546,execs_527527,op_quick,pos_92.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000349,sig_06,src_000047,time_124136371,execs_528043,op_quick,pos_595.buzz b/tests/fuzzed/id_000349,sig_06,src_000047,time_124136371,execs_528043,op_quick,pos_595.buzz index 41f00941..a994533a 100644 --- a/tests/fuzzed/id_000349,sig_06,src_000047,time_124136371,execs_528043,op_quick,pos_595.buzz +++ b/tests/fuzzed/id_000349,sig_06,src_000047,time_124136371,execs_528043,op_quick,pos_595.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000350,sig_06,src_000047,time_124145431,execs_528083,op_quick,pos_635.buzz b/tests/fuzzed/id_000350,sig_06,src_000047,time_124145431,execs_528083,op_quick,pos_635.buzz index 4bf64485..c1033cc3 100644 --- a/tests/fuzzed/id_000350,sig_06,src_000047,time_124145431,execs_528083,op_quick,pos_635.buzz +++ b/tests/fuzzed/id_000350,sig_06,src_000047,time_124145431,execs_528083,op_quick,pos_635.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000351,sig_06,src_000047,time_124161290,execs_528144,op_quick,pos_695.buzz b/tests/fuzzed/id_000351,sig_06,src_000047,time_124161290,execs_528144,op_quick,pos_695.buzz index db14a747..84dc2092 100644 --- a/tests/fuzzed/id_000351,sig_06,src_000047,time_124161290,execs_528144,op_quick,pos_695.buzz +++ b/tests/fuzzed/id_000351,sig_06,src_000047,time_124161290,execs_528144,op_quick,pos_695.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000352,sig_11,src_000047,time_124192242,execs_528270,op_quick,pos_821.buzz b/tests/fuzzed/id_000352,sig_11,src_000047,time_124192242,execs_528270,op_quick,pos_821.buzz index 02b6207d..22aa0a5b 100644 --- a/tests/fuzzed/id_000352,sig_11,src_000047,time_124192242,execs_528270,op_quick,pos_821.buzz +++ b/tests/fuzzed/id_000352,sig_11,src_000047,time_124192242,execs_528270,op_quick,pos_821.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000353,sig_11,src_000047,time_124237297,execs_528463,op_quick,pos_1002.buzz b/tests/fuzzed/id_000353,sig_11,src_000047,time_124237297,execs_528463,op_quick,pos_1002.buzz index eec4501f..8745f892 100644 --- a/tests/fuzzed/id_000353,sig_11,src_000047,time_124237297,execs_528463,op_quick,pos_1002.buzz +++ b/tests/fuzzed/id_000353,sig_11,src_000047,time_124237297,execs_528463,op_quick,pos_1002.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000354,sig_11,src_000047,time_124279900,execs_528642,op_quick,pos_1169.buzz b/tests/fuzzed/id_000354,sig_11,src_000047,time_124279900,execs_528642,op_quick,pos_1169.buzz index f6b0bbc8..f9e94ffb 100644 --- a/tests/fuzzed/id_000354,sig_11,src_000047,time_124279900,execs_528642,op_quick,pos_1169.buzz +++ b/tests/fuzzed/id_000354,sig_11,src_000047,time_124279900,execs_528642,op_quick,pos_1169.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000355,sig_06,src_002743,time_124784112,execs_530854,op_quick,pos_395.buzz b/tests/fuzzed/id_000355,sig_06,src_002743,time_124784112,execs_530854,op_quick,pos_395.buzz index 353a9fe2..3f1afada 100644 --- a/tests/fuzzed/id_000355,sig_06,src_002743,time_124784112,execs_530854,op_quick,pos_395.buzz +++ b/tests/fuzzed/id_000355,sig_06,src_002743,time_124784112,execs_530854,op_quick,pos_395.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "any" { final anything: any = "hello"; diff --git a/tests/fuzzed/id_000356,sig_06,src_000036,time_126023882,execs_536351,op_quick,pos_53.buzz b/tests/fuzzed/id_000356,sig_06,src_000036,time_126023882,execs_536351,op_quick,pos_53.buzz index 52394c9c..641c7e5d 100644 --- a/tests/fuzzed/id_000356,sig_06,src_000036,time_126023882,execs_536351,op_quick,pos_53.buzz +++ b/tests/fuzzed/id_000356,sig_06,src_000036,time_126023882,execs_536351,op_quick,pos_53.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: it } { return .{ diff --git a/tests/fuzzed/id_000357,sig_06,src_000036,time_126078535,execs_536579,op_quick,pos_221.buzz b/tests/fuzzed/id_000357,sig_06,src_000036,time_126078535,execs_536579,op_quick,pos_221.buzz index e0fe2e81..b7dbd652 100644 --- a/tests/fuzzed/id_000357,sig_06,src_000036,time_126078535,execs_536579,op_quick,pos_221.buzz +++ b/tests/fuzzed/id_000357,sig_06,src_000036,time_126078535,execs_536579,op_quick,pos_221.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000358,sig_06,src_000036,time_126145735,execs_536866,op_quick,pos_435.buzz b/tests/fuzzed/id_000358,sig_06,src_000036,time_126145735,execs_536866,op_quick,pos_435.buzz index 45d4e857..2a3c3e34 100644 --- a/tests/fuzzed/id_000358,sig_06,src_000036,time_126145735,execs_536866,op_quick,pos_435.buzz +++ b/tests/fuzzed/id_000358,sig_06,src_000036,time_126145735,execs_536866,op_quick,pos_435.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000359,sig_06,src_000036,time_126220134,execs_537174,op_quick,pos_731.buzz b/tests/fuzzed/id_000359,sig_06,src_000036,time_126220134,execs_537174,op_quick,pos_731.buzz index ff712ec9..eaeeaf8e 100644 --- a/tests/fuzzed/id_000359,sig_06,src_000036,time_126220134,execs_537174,op_quick,pos_731.buzz +++ b/tests/fuzzed/id_000359,sig_06,src_000036,time_126220134,execs_537174,op_quick,pos_731.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000360,sig_06,src_000036,time_126297966,execs_537481,op_quick,pos_1013.buzz b/tests/fuzzed/id_000360,sig_06,src_000036,time_126297966,execs_537481,op_quick,pos_1013.buzz index c354783f..4a745582 100644 --- a/tests/fuzzed/id_000360,sig_06,src_000036,time_126297966,execs_537481,op_quick,pos_1013.buzz +++ b/tests/fuzzed/id_000360,sig_06,src_000036,time_126297966,execs_537481,op_quick,pos_1013.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000361,sig_06,src_000036,time_126378354,execs_537804,op_quick,pos_1324.buzz b/tests/fuzzed/id_000361,sig_06,src_000036,time_126378354,execs_537804,op_quick,pos_1324.buzz index 372032dc..08a62bf3 100644 --- a/tests/fuzzed/id_000361,sig_06,src_000036,time_126378354,execs_537804,op_quick,pos_1324.buzz +++ b/tests/fuzzed/id_000361,sig_06,src_000036,time_126378354,execs_537804,op_quick,pos_1324.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000362,sig_06,src_000036,time_126459384,execs_538148,op_flip2,pos_633.buzz b/tests/fuzzed/id_000362,sig_06,src_000036,time_126459384,execs_538148,op_flip2,pos_633.buzz index f2bda1b1..f9c4aa25 100644 --- a/tests/fuzzed/id_000362,sig_06,src_000036,time_126459384,execs_538148,op_flip2,pos_633.buzz +++ b/tests/fuzzed/id_000362,sig_06,src_000036,time_126459384,execs_538148,op_flip2,pos_633.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000363,sig_06,src_001308,time_129546242,execs_551523,op_quick,pos_395.buzz b/tests/fuzzed/id_000363,sig_06,src_001308,time_129546242,execs_551523,op_quick,pos_395.buzz index bf411e25..64aa7174 100644 --- a/tests/fuzzed/id_000363,sig_06,src_001308,time_129546242,execs_551523,op_quick,pos_395.buzz +++ b/tests/fuzzed/id_000363,sig_06,src_001308,time_129546242,execs_551523,op_quick,pos_395.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000364,sig_06,src_002724,time_130658572,execs_556311,op_havoc,rep_4.buzz b/tests/fuzzed/id_000364,sig_06,src_002724,time_130658572,execs_556311,op_havoc,rep_4.buzz index ff4c3365..2c86f86a 100644 --- a/tests/fuzzed/id_000364,sig_06,src_002724,time_130658572,execs_556311,op_havoc,rep_4.buzz +++ b/tests/fuzzed/id_000364,sig_06,src_002724,time_130658572,execs_556311,op_havoc,rep_4.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun hey(name: str = "Joe", age: int =ver()) { ?, fourth: int = 1) > str => "Hello {name} you're {age} {father} {fourth}"; diff --git a/tests/fuzzed/id_000365,sig_06,src_002096,time_131750132,execs_560931,op_quick,pos_1345.buzz b/tests/fuzzed/id_000365,sig_06,src_002096,time_131750132,execs_560931,op_quick,pos_1345.buzz index c30dcade..7d3fa075 100644 --- a/tests/fuzzed/id_000365,sig_06,src_002096,time_131750132,execs_560931,op_quick,pos_1345.buzz +++ b/tests/fuzzed/id_000365,sig_06,src_002096,time_131750132,execs_560931,op_quick,pos_1345.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Comparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000366,sig_06,src_000011,time_132660299,execs_564792,op_quick,pos_207.buzz b/tests/fuzzed/id_000366,sig_06,src_000011,time_132660299,execs_564792,op_quick,pos_207.buzz index d0ccd995..c48dc743 100644 --- a/tests/fuzzed/id_000366,sig_06,src_000011,time_132660299,execs_564792,op_quick,pos_207.buzz +++ b/tests/fuzzed/id_000366,sig_06,src_000011,time_132660299,execs_564792,op_quick,pos_207.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lambda/Anonymous functions" { final mul: fun (n: int) > int = fun (n: int) > int => n * 2; diff --git a/tests/fuzzed/id_000367,sig_06,src_002651,time_134817591,execs_570429,op_quick,pos_1260.buzz b/tests/fuzzed/id_000367,sig_06,src_002651,time_134817591,execs_570429,op_quick,pos_1260.buzz index 1e697eac..e7c6531e 100644 --- a/tests/fuzzed/id_000367,sig_06,src_002651,time_134817591,execs_570429,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000367,sig_06,src_002651,time_134817591,execs_570429,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000368,sig_06,src_002591,time_136486905,execs_576825,op_quick,pos_1260.buzz b/tests/fuzzed/id_000368,sig_06,src_002591,time_136486905,execs_576825,op_quick,pos_1260.buzz index cc58ae59..afe9b8bd 100644 --- a/tests/fuzzed/id_000368,sig_06,src_002591,time_136486905,execs_576825,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000368,sig_06,src_002591,time_136486905,execs_576825,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000369,sig_06,src_002408,time_138068601,execs_583673,op_quick,pos_1856.buzz b/tests/fuzzed/id_000369,sig_06,src_002408,time_138068601,execs_583673,op_quick,pos_1856.buzz index 1ba93b7d..8171f81c 100644 --- a/tests/fuzzed/id_000369,sig_06,src_002408,time_138068601,execs_583673,op_quick,pos_1856.buzz +++ b/tests/fuzzed/id_000369,sig_06,src_002408,time_138068601,execs_583673,op_quick,pos_1856.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000370,sig_06,src_002408,time_138112253,execs_583835,op_quick,pos_2018.buzz b/tests/fuzzed/id_000370,sig_06,src_002408,time_138112253,execs_583835,op_quick,pos_2018.buzz index cfd82ef5..cd3627bc 100644 --- a/tests/fuzzed/id_000370,sig_06,src_002408,time_138112253,execs_583835,op_quick,pos_2018.buzz +++ b/tests/fuzzed/id_000370,sig_06,src_002408,time_138112253,execs_583835,op_quick,pos_2018.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000372,sig_06,src_002709,time_138994940,execs_587182,op_quick,pos_1189.buzz b/tests/fuzzed/id_000372,sig_06,src_002709,time_138994940,execs_587182,op_quick,pos_1189.buzz index 8786e6aa..3cd1b5c2 100644 --- a/tests/fuzzed/id_000372,sig_06,src_002709,time_138994940,execs_587182,op_quick,pos_1189.buzz +++ b/tests/fuzzed/id_000372,sig_06,src_002709,time_138994940,execs_587182,op_quick,pos_1189.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000373,sig_06,src_002709,time_139000332,execs_587197,op_quick,pos_1204.buzz b/tests/fuzzed/id_000373,sig_06,src_002709,time_139000332,execs_587197,op_quick,pos_1204.buzz index 4c657d52..4e0ac0cc 100644 --- a/tests/fuzzed/id_000373,sig_06,src_002709,time_139000332,execs_587197,op_quick,pos_1204.buzz +++ b/tests/fuzzed/id_000373,sig_06,src_002709,time_139000332,execs_587197,op_quick,pos_1204.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000374,sig_06,src_002775,time_140305450,execs_592573,op_quick,pos_856.buzz b/tests/fuzzed/id_000374,sig_06,src_002775,time_140305450,execs_592573,op_quick,pos_856.buzz index 05beff9c..c3f7446c 100644 --- a/tests/fuzzed/id_000374,sig_06,src_002775,time_140305450,execs_592573,op_quick,pos_856.buzz +++ b/tests/fuzzed/id_000374,sig_06,src_002775,time_140305450,execs_592573,op_quick,pos_856.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000375,sig_06,src_002775,time_140402542,execs_592943,op_quick,pos_1226.buzz b/tests/fuzzed/id_000375,sig_06,src_002775,time_140402542,execs_592943,op_quick,pos_1226.buzz index 322a6867..106e9103 100644 --- a/tests/fuzzed/id_000375,sig_06,src_002775,time_140402542,execs_592943,op_quick,pos_1226.buzz +++ b/tests/fuzzed/id_000375,sig_06,src_002775,time_140402542,execs_592943,op_quick,pos_1226.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun getInfo() > obj{ name: str, age: int } { return .{ diff --git a/tests/fuzzed/id_000376,sig_06,src_002068,time_141285424,execs_596810,op_quick,pos_413.buzz b/tests/fuzzed/id_000376,sig_06,src_002068,time_141285424,execs_596810,op_quick,pos_413.buzz index ad107205..dc249e59 100644 --- a/tests/fuzzed/id_000376,sig_06,src_002068,time_141285424,execs_596810,op_quick,pos_413.buzz +++ b/tests/fuzzed/id_000376,sig_06,src_002068,time_141285424,execs_596810,op_quick,pos_413.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/fuzzed/id_000377,sig_11,src_002068,time_141307178,execs_596896,op_quick,pos_499.buzz b/tests/fuzzed/id_000377,sig_11,src_002068,time_141307178,execs_596896,op_quick,pos_499.buzz index f5c88fa2..b87c96a9 100644 --- a/tests/fuzzed/id_000377,sig_11,src_002068,time_141307178,execs_596896,op_quick,pos_499.buzz +++ b/tests/fuzzed/id_000377,sig_11,src_002068,time_141307178,execs_596896,op_quick,pos_499.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "if" { if (true) { diff --git a/tests/fuzzed/id_000378,sig_06,src_002116,time_142070148,execs_600480,op_inf,rep_3.buzz b/tests/fuzzed/id_000378,sig_06,src_002116,time_142070148,execs_600480,op_inf,rep_3.buzz index d1676175..db831a78 100644 --- a/tests/fuzzed/id_000378,sig_06,src_002116,time_142070148,execs_600480,op_inf,rep_3.buzz +++ b/tests/fuzzed/id_000378,sig_06,src_002116,time_142070148,execs_600480,op_inf,rep_3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000379,sig_06,src_002116,time_142136589,execs_600758,op_quick,pos_241.buzz b/tests/fuzzed/id_000379,sig_06,src_002116,time_142136589,execs_600758,op_quick,pos_241.buzz index ff3e0688..3e29b5ff 100644 --- a/tests/fuzzed/id_000379,sig_06,src_002116,time_142136589,execs_600758,op_quick,pos_241.buzz +++ b/tests/fuzzed/id_000379,sig_06,src_002116,time_142136589,execs_600758,op_quick,pos_241.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000380,sig_06,src_002116,time_142357467,execs_601586,op_quick,pos_1045.buzz b/tests/fuzzed/id_000380,sig_06,src_002116,time_142357467,execs_601586,op_quick,pos_1045.buzz index e519084d..989f0c21 100644 --- a/tests/fuzzed/id_000380,sig_06,src_002116,time_142357467,execs_601586,op_quick,pos_1045.buzz +++ b/tests/fuzzed/id_000380,sig_06,src_002116,time_142357467,execs_601586,op_quick,pos_1045.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; enum StrEnum { one, diff --git a/tests/fuzzed/id_000382,sig_11,src_002198,time_143526968,execs_604368,op_quick,pos_542.buzz b/tests/fuzzed/id_000382,sig_11,src_002198,time_143526968,execs_604368,op_quick,pos_542.buzz index 922c156a..6c4f667e 100644 --- a/tests/fuzzed/id_000382,sig_11,src_002198,time_143526968,execs_604368,op_quick,pos_542.buzz +++ b/tests/fuzzed/id_000382,sig_11,src_002198,time_143526968,execs_604368,op_quick,pos_542.buzz @@ -1,5 +1,5 @@ -import "std"; -import "buffer" as _; +import "buzz:std"; +import "buzz:buffer" as _; test "Reading and writing in a buffer" { final buffer = Buffer.init(); diff --git a/tests/fuzzed/id_000383,sig_11,src_001621,time_144228542,execs_606645,op_inf,rep_2.buzz b/tests/fuzzed/id_000383,sig_11,src_001621,time_144228542,execs_606645,op_inf,rep_2.buzz index 1800d178..05b8fd82 100644 --- a/tests/fuzzed/id_000383,sig_11,src_001621,time_144228542,execs_606645,op_inf,rep_2.buzz +++ b/tests/fuzzed/id_000383,sig_11,src_001621,time_144228542,execs_606645,op_inf,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000384,sig_06,src_001621,time_144703637,execs_608378,op_quick,pos_1707.buzz b/tests/fuzzed/id_000384,sig_06,src_001621,time_144703637,execs_608378,op_quick,pos_1707.buzz index 0468f5cd..81514804 100644 --- a/tests/fuzzed/id_000384,sig_06,src_001621,time_144703637,execs_608378,op_quick,pos_1707.buzz +++ b/tests/fuzzed/id_000384,sig_06,src_001621,time_144703637,execs_608378,op_quick,pos_1707.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000385,sig_06,src_002501,time_146592309,execs_616204,op_quick,pos_1378.buzz b/tests/fuzzed/id_000385,sig_06,src_002501,time_146592309,execs_616204,op_quick,pos_1378.buzz index 8d4d024e..a25884bc 100644 --- a/tests/fuzzed/id_000385,sig_06,src_002501,time_146592309,execs_616204,op_quick,pos_1378.buzz +++ b/tests/fuzzed/id_000385,sig_06,src_002501,time_146592309,execs_616204,op_quick,pos_1378.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "list.forEach" { final data = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000386,sig_06,src_001974,time_150616543,execs_629065,op_quick,pos_1361.buzz b/tests/fuzzed/id_000386,sig_06,src_001974,time_150616543,execs_629065,op_quick,pos_1361.buzz index 00e1fceb..d775b493 100644 --- a/tests/fuzzed/id_000386,sig_06,src_001974,time_150616543,execs_629065,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000386,sig_06,src_001974,time_150616543,execs_629065,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000387,sig_06,src_000030,time_151244497,execs_631388,op_quick,pos_487.buzz b/tests/fuzzed/id_000387,sig_06,src_000030,time_151244497,execs_631388,op_quick,pos_487.buzz index b427fcaf..3bc577a4 100644 --- a/tests/fuzzed/id_000387,sig_06,src_000030,time_151244497,execs_631388,op_quick,pos_487.buzz +++ b/tests/fuzzed/id_000387,sig_06,src_000030,time_151244497,execs_631388,op_quick,pos_487.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000388,sig_06,src_000030,time_151507726,execs_632383,op_flip1,pos_107.buzz b/tests/fuzzed/id_000388,sig_06,src_000030,time_151507726,execs_632383,op_flip1,pos_107.buzz index de73e24a..c1bccf49 100644 --- a/tests/fuzzed/id_000388,sig_06,src_000030,time_151507726,execs_632383,op_flip1,pos_107.buzz +++ b/tests/fuzzed/id_000388,sig_06,src_000030,time_151507726,execs_632383,op_flip1,pos_107.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000389,sig_06,src_002882,time_152669967,execs_637308,op_havoc,rep_1.buzz b/tests/fuzzed/id_000389,sig_06,src_002882,time_152669967,execs_637308,op_havoc,rep_1.buzz index 66df00cf..b3181561 100644 --- a/tests/fuzzed/id_000389,sig_06,src_002882,time_152669967,execs_637308,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000389,sig_06,src_002882,time_152669967,execs_637308,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"|ello ([a-z]+)"; diff --git a/tests/fuzzed/id_000390,sig_06,src_002151,time_153376684,execs_640072,op_quick,pos_292.buzz b/tests/fuzzed/id_000390,sig_06,src_002151,time_153376684,execs_640072,op_quick,pos_292.buzz index 8f8e2707..20d4ceaf 100644 --- a/tests/fuzzed/id_000390,sig_06,src_002151,time_153376684,execs_640072,op_quick,pos_292.buzz +++ b/tests/fuzzed/id_000390,sig_06,src_002151,time_153376684,execs_640072,op_quick,pos_292.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "utf8" { final msg = "hello 🔥 buzz !"; diff --git a/tests/fuzzed/id_000391,sig_06,src_001475,time_155189306,execs_648173,op_quick,pos_1116.buzz b/tests/fuzzed/id_000391,sig_06,src_001475,time_155189306,execs_648173,op_quick,pos_1116.buzz index 43383543..49b95e61 100644 --- a/tests/fuzzed/id_000391,sig_06,src_001475,time_155189306,execs_648173,op_quick,pos_1116.buzz +++ b/tests/fuzzed/id_000391,sig_06,src_001475,time_155189306,execs_648173,op_quick,pos_1116.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000392,sig_06,src_001475,time_155207778,execs_648242,op_quick,pos_1173.buzz b/tests/fuzzed/id_000392,sig_06,src_001475,time_155207778,execs_648242,op_quick,pos_1173.buzz index 309453f9..f2b03cb7 100644 --- a/tests/fuzzed/id_000392,sig_06,src_001475,time_155207778,execs_648242,op_quick,pos_1173.buzz +++ b/tests/fuzzed/id_000392,sig_06,src_001475,time_155207778,execs_648242,op_quick,pos_1173.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000393,sig_06,src_001475,time_155257724,execs_648416,op_quick,pos_1347.buzz b/tests/fuzzed/id_000393,sig_06,src_001475,time_155257724,execs_648416,op_quick,pos_1347.buzz index 26aa6923..4e00dd8a 100644 --- a/tests/fuzzed/id_000393,sig_06,src_001475,time_155257724,execs_648416,op_quick,pos_1347.buzz +++ b/tests/fuzzed/id_000393,sig_06,src_001475,time_155257724,execs_648416,op_quick,pos_1347.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000394,sig_06,src_002597,time_157391485,execs_657110,op_quick,pos_1260.buzz b/tests/fuzzed/id_000394,sig_06,src_002597,time_157391485,execs_657110,op_quick,pos_1260.buzz index 70cd607f..90272775 100644 --- a/tests/fuzzed/id_000394,sig_06,src_002597,time_157391485,execs_657110,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000394,sig_06,src_002597,time_157391485,execs_657110,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000396,sig_06,src_002649,time_159900099,execs_665196,op_quick,pos_1330.buzz b/tests/fuzzed/id_000396,sig_06,src_002649,time_159900099,execs_665196,op_quick,pos_1330.buzz index 4175a37a..30134ca2 100644 --- a/tests/fuzzed/id_000396,sig_06,src_002649,time_159900099,execs_665196,op_quick,pos_1330.buzz +++ b/tests/fuzzed/id_000396,sig_06,src_002649,time_159900099,execs_665196,op_quick,pos_1330.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000397,sig_06,src_002710,time_161148628,execs_669334,op_quick,pos_1266.buzz b/tests/fuzzed/id_000397,sig_06,src_002710,time_161148628,execs_669334,op_quick,pos_1266.buzz index 8e830ccd..83eeb963 100644 --- a/tests/fuzzed/id_000397,sig_06,src_002710,time_161148628,execs_669334,op_quick,pos_1266.buzz +++ b/tests/fuzzed/id_000397,sig_06,src_002710,time_161148628,execs_669334,op_quick,pos_1266.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000398,sig_06,src_002650,time_162701538,execs_674554,op_quick,pos_1361.buzz b/tests/fuzzed/id_000398,sig_06,src_002650,time_162701538,execs_674554,op_quick,pos_1361.buzz index 3949143e..807af8ff 100644 --- a/tests/fuzzed/id_000398,sig_06,src_002650,time_162701538,execs_674554,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000398,sig_06,src_002650,time_162701538,execs_674554,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000399,sig_06,src_002884,time_163620812,execs_677989,op_havoc,rep_2.buzz b/tests/fuzzed/id_000399,sig_06,src_002884,time_163620812,execs_677989,op_havoc,rep_2.buzz index 1746cda4..e2b689dd 100644 --- a/tests/fuzzed/id_000399,sig_06,src_002884,time_163620812,execs_677989,op_havoc,rep_2.buzz +++ b/tests/fuzzed/id_000399,sig_06,src_002884,time_163620812,execs_677989,op_havoc,rep_2.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000400,sig_06,src_002879,time_164057626,execs_679854,op_quick,pos_1141.buzz b/tests/fuzzed/id_000400,sig_06,src_002879,time_164057626,execs_679854,op_quick,pos_1141.buzz index 12f87837..640da953 100644 --- a/tests/fuzzed/id_000400,sig_06,src_002879,time_164057626,execs_679854,op_quick,pos_1141.buzz +++ b/tests/fuzzed/id_000400,sig_06,src_002879,time_164057626,execs_679854,op_quick,pos_1141.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000401,sig_06,src_002879,time_164131427,execs_680152,op_arith8,pos_490,val_-3.buzz b/tests/fuzzed/id_000401,sig_06,src_002879,time_164131427,execs_680152,op_arith8,pos_490,val_-3.buzz index 0e2d7165..cd1327dd 100644 --- a/tests/fuzzed/id_000401,sig_06,src_002879,time_164131427,execs_680152,op_arith8,pos_490,val_-3.buzz +++ b/tests/fuzzed/id_000401,sig_06,src_002879,time_164131427,execs_680152,op_arith8,pos_490,val_-3.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000402,sig_06,src_002879,time_164132603,execs_680156,op_arith8,pos_490,val_-6.buzz b/tests/fuzzed/id_000402,sig_06,src_002879,time_164132603,execs_680156,op_arith8,pos_490,val_-6.buzz index 3c7dd6bd..b19a0fc4 100644 --- a/tests/fuzzed/id_000402,sig_06,src_002879,time_164132603,execs_680156,op_arith8,pos_490,val_-6.buzz +++ b/tests/fuzzed/id_000402,sig_06,src_002879,time_164132603,execs_680156,op_arith8,pos_490,val_-6.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000403,sig_06,src_002295,time_169803629,execs_701244,op_quick,pos_1206.buzz b/tests/fuzzed/id_000403,sig_06,src_002295,time_169803629,execs_701244,op_quick,pos_1206.buzz index eb96e86d..1d815d8f 100644 --- a/tests/fuzzed/id_000403,sig_06,src_002295,time_169803629,execs_701244,op_quick,pos_1206.buzz +++ b/tests/fuzzed/id_000403,sig_06,src_002295,time_169803629,execs_701244,op_quick,pos_1206.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000404,sig_06,src_001988,time_170873964,execs_705329,op_quick,pos_1260.buzz b/tests/fuzzed/id_000404,sig_06,src_001988,time_170873964,execs_705329,op_quick,pos_1260.buzz index 5da7255d..f2bc5dde 100644 --- a/tests/fuzzed/id_000404,sig_06,src_001988,time_170873964,execs_705329,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000404,sig_06,src_001988,time_170873964,execs_705329,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000405,sig_06,src_002705,time_174459313,execs_716841,op_quick,pos_1292.buzz b/tests/fuzzed/id_000405,sig_06,src_002705,time_174459313,execs_716841,op_quick,pos_1292.buzz index 8e6516cd..62101709 100644 --- a/tests/fuzzed/id_000405,sig_06,src_002705,time_174459313,execs_716841,op_quick,pos_1292.buzz +++ b/tests/fuzzed/id_000405,sig_06,src_002705,time_174459313,execs_716841,op_quick,pos_1292.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000406,sig_06,src_002937,time_177187920,execs_729142,op_quick,pos_1393.buzz b/tests/fuzzed/id_000406,sig_06,src_002937,time_177187920,execs_729142,op_quick,pos_1393.buzz index 698812a5..bc787dba 100644 --- a/tests/fuzzed/id_000406,sig_06,src_002937,time_177187920,execs_729142,op_quick,pos_1393.buzz +++ b/tests/fuzzed/id_000406,sig_06,src_002937,time_177187920,execs_729142,op_quick,pos_1393.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000407,sig_06,src_002641,time_178244890,execs_732799,op_quick,pos_1260.buzz b/tests/fuzzed/id_000407,sig_06,src_002641,time_178244890,execs_732799,op_quick,pos_1260.buzz index 9af9565d..7520fd11 100644 --- a/tests/fuzzed/id_000407,sig_06,src_002641,time_178244890,execs_732799,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000407,sig_06,src_002641,time_178244890,execs_732799,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000408,sig_06,src_000045,time_180296864,execs_738689,op_quick,pos_168.buzz b/tests/fuzzed/id_000408,sig_06,src_000045,time_180296864,execs_738689,op_quick,pos_168.buzz index 1dd74cfa..3d87e413 100644 --- a/tests/fuzzed/id_000408,sig_06,src_000045,time_180296864,execs_738689,op_quick,pos_168.buzz +++ b/tests/fuzzed/id_000408,sig_06,src_000045,time_180296864,execs_738689,op_quick,pos_168.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000409,sig_06,src_000045,time_180342705,execs_738873,op_quick,pos_327.buzz b/tests/fuzzed/id_000409,sig_06,src_000045,time_180342705,execs_738873,op_quick,pos_327.buzz index f5a00407..acd720cc 100644 --- a/tests/fuzzed/id_000409,sig_06,src_000045,time_180342705,execs_738873,op_quick,pos_327.buzz +++ b/tests/fuzzed/id_000409,sig_06,src_000045,time_180342705,execs_738873,op_quick,pos_327.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000410,sig_11,src_000045,time_180550642,execs_739707,op_quick,pos_1077.buzz b/tests/fuzzed/id_000410,sig_11,src_000045,time_180550642,execs_739707,op_quick,pos_1077.buzz index 7d48d9ec..fef21afc 100644 --- a/tests/fuzzed/id_000410,sig_11,src_000045,time_180550642,execs_739707,op_quick,pos_1077.buzz +++ b/tests/fuzzed/id_000410,sig_11,src_000045,time_180550642,execs_739707,op_quick,pos_1077.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000411,sig_06,src_000045,time_180628496,execs_740022,op_flip1,pos_1076.buzz b/tests/fuzzed/id_000411,sig_06,src_000045,time_180628496,execs_740022,op_flip1,pos_1076.buzz index 95bda2ad..1804a3a4 100644 --- a/tests/fuzzed/id_000411,sig_06,src_000045,time_180628496,execs_740022,op_flip1,pos_1076.buzz +++ b/tests/fuzzed/id_000411,sig_06,src_000045,time_180628496,execs_740022,op_flip1,pos_1076.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000412,sig_06,src_002993,time_181476520,execs_743732,op_quick,pos_445.buzz b/tests/fuzzed/id_000412,sig_06,src_002993,time_181476520,execs_743732,op_quick,pos_445.buzz index f27a66c1..810de5ee 100644 --- a/tests/fuzzed/id_000412,sig_06,src_002993,time_181476520,execs_743732,op_quick,pos_445.buzz +++ b/tests/fuzzed/id_000412,sig_06,src_002993,time_181476520,execs_743732,op_quick,pos_445.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000413,sig_06,src_002993,time_181637390,execs_744389,op_quick,pos_1078.buzz b/tests/fuzzed/id_000413,sig_06,src_002993,time_181637390,execs_744389,op_quick,pos_1078.buzz index 478f7b2a..26d0fad4 100644 --- a/tests/fuzzed/id_000413,sig_06,src_002993,time_181637390,execs_744389,op_quick,pos_1078.buzz +++ b/tests/fuzzed/id_000413,sig_06,src_002993,time_181637390,execs_744389,op_quick,pos_1078.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Range" { final limit = 10; diff --git a/tests/fuzzed/id_000414,sig_06,src_002585,time_182796544,execs_748803,op_quick,pos_1188.buzz b/tests/fuzzed/id_000414,sig_06,src_002585,time_182796544,execs_748803,op_quick,pos_1188.buzz index 23e0e03b..866f3d86 100644 --- a/tests/fuzzed/id_000414,sig_06,src_002585,time_182796544,execs_748803,op_quick,pos_1188.buzz +++ b/tests/fuzzed/id_000414,sig_06,src_002585,time_182796544,execs_748803,op_quick,pos_1188.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000415,sig_06,src_001465,time_183943666,execs_753180,op_quick,pos_1474.buzz b/tests/fuzzed/id_000415,sig_06,src_001465,time_183943666,execs_753180,op_quick,pos_1474.buzz index 526c89c9..952045af 100644 --- a/tests/fuzzed/id_000415,sig_06,src_001465,time_183943666,execs_753180,op_quick,pos_1474.buzz +++ b/tests/fuzzed/id_000415,sig_06,src_001465,time_183943666,execs_753180,op_quick,pos_1474.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun count::(list: [T]) > int { return list.len(); diff --git a/tests/fuzzed/id_000416,sig_06,src_002410,time_185380055,execs_759046,op_quick,pos_874.buzz b/tests/fuzzed/id_000416,sig_06,src_002410,time_185380055,execs_759046,op_quick,pos_874.buzz index 09703f3c..eb30cd9a 100644 --- a/tests/fuzzed/id_000416,sig_06,src_002410,time_185380055,execs_759046,op_quick,pos_874.buzz +++ b/tests/fuzzed/id_000416,sig_06,src_002410,time_185380055,execs_759046,op_quick,pos_874.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main() > void !> any { // Async call, creates a new fiber, yield type must be nullable because resume will return null when nothing yielded diff --git a/tests/fuzzed/id_000420,sig_06,src_002287,time_186911538,execs_770090,op_quick,pos_1260.buzz b/tests/fuzzed/id_000420,sig_06,src_002287,time_186911538,execs_770090,op_quick,pos_1260.buzz index 3958e7e6..180972bb 100644 --- a/tests/fuzzed/id_000420,sig_06,src_002287,time_186911538,execs_770090,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000420,sig_06,src_002287,time_186911538,execs_770090,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000421,sig_06,src_002248,time_187689491,execs_773131,op_arith8,pos_468,val_+26.buzz b/tests/fuzzed/id_000421,sig_06,src_002248,time_187689491,execs_773131,op_arith8,pos_468,val_+26.buzz index 798defc8..84a0c830 100644 --- a/tests/fuzzed/id_000421,sig_06,src_002248,time_187689491,execs_773131,op_arith8,pos_468,val_+26.buzz +++ b/tests/fuzzed/id_000421,sig_06,src_002248,time_187689491,execs_773131,op_arith8,pos_468,val_+26.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Basic types" { _ = "hello world"; diff --git a/tests/fuzzed/id_000423,sig_06,src_002915,time_190794291,execs_785175,op_quick,pos_479.buzz b/tests/fuzzed/id_000423,sig_06,src_002915,time_190794291,execs_785175,op_quick,pos_479.buzz index d21a37e0..e34c2b27 100644 --- a/tests/fuzzed/id_000423,sig_06,src_002915,time_190794291,execs_785175,op_quick,pos_479.buzz +++ b/tests/fuzzed/id_000423,sig_06,src_002915,time_190794291,execs_785175,op_quick,pos_479.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000424,sig_06,src_002915,time_191082029,execs_785861,op_quick,pos_1141.buzz b/tests/fuzzed/id_000424,sig_06,src_002915,time_191082029,execs_785861,op_quick,pos_1141.buzz index 1c171934..56959ff1 100644 --- a/tests/fuzzed/id_000424,sig_06,src_002915,time_191082029,execs_785861,op_quick,pos_1141.buzz +++ b/tests/fuzzed/id_000424,sig_06,src_002915,time_191082029,execs_785861,op_quick,pos_1141.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "pattern.match" { final pattern = $"hello ([a-z]+)"; diff --git a/tests/fuzzed/id_000427,sig_06,src_001735,time_195386382,execs_799905,op_inf,rep_7.buzz b/tests/fuzzed/id_000427,sig_06,src_001735,time_195386382,execs_799905,op_inf,rep_7.buzz index 8d603257..29c77ed1 100644 --- a/tests/fuzzed/id_000427,sig_06,src_001735,time_195386382,execs_799905,op_inf,rep_7.buzz +++ b/tests/fuzzed/id_000427,sig_06,src_001735,time_195386382,execs_799905,op_inf,rep_7.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000428,sig_06,src_001735,time_196135868,execs_802454,op_arith8,pos_1724,val_+5.buzz b/tests/fuzzed/id_000428,sig_06,src_001735,time_196135868,execs_802454,op_arith8,pos_1724,val_+5.buzz index 7c32e4d7..2e4b7d90 100644 --- a/tests/fuzzed/id_000428,sig_06,src_001735,time_196135868,execs_802454,op_arith8,pos_1724,val_+5.buzz +++ b/tests/fuzzed/id_000428,sig_06,src_001735,time_196135868,execs_802454,op_arith8,pos_1724,val_+5.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000429,sig_06,src_001972,time_197334718,execs_807322,op_quick,pos_1260,val_+5.buzz b/tests/fuzzed/id_000429,sig_06,src_001972,time_197334718,execs_807322,op_quick,pos_1260,val_+5.buzz index ba095890..e155cacb 100644 --- a/tests/fuzzed/id_000429,sig_06,src_001972,time_197334718,execs_807322,op_quick,pos_1260,val_+5.buzz +++ b/tests/fuzzed/id_000429,sig_06,src_001972,time_197334718,execs_807322,op_quick,pos_1260,val_+5.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000430,sig_06,src_001511,time_199030599,execs_815681,op_quick,pos_2046.buzz b/tests/fuzzed/id_000430,sig_06,src_001511,time_199030599,execs_815681,op_quick,pos_2046.buzz index 3ef0aa2c..9911d01a 100644 --- a/tests/fuzzed/id_000430,sig_06,src_001511,time_199030599,execs_815681,op_quick,pos_2046.buzz +++ b/tests/fuzzed/id_000430,sig_06,src_001511,time_199030599,execs_815681,op_quick,pos_2046.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Lists" { final list = [ 1, 2, 3, 4 ]; diff --git a/tests/fuzzed/id_000431,sig_06,src_002598,time_200437006,execs_821734,op_quick,pos_1361.buzz b/tests/fuzzed/id_000431,sig_06,src_002598,time_200437006,execs_821734,op_quick,pos_1361.buzz index 7eac64ff..ba306304 100644 --- a/tests/fuzzed/id_000431,sig_06,src_002598,time_200437006,execs_821734,op_quick,pos_1361.buzz +++ b/tests/fuzzed/id_000431,sig_06,src_002598,time_200437006,execs_821734,op_quick,pos_1361.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000432,sig_06,src_002653,time_201357285,execs_824741,op_quick,pos_1391.buzz b/tests/fuzzed/id_000432,sig_06,src_002653,time_201357285,execs_824741,op_quick,pos_1391.buzz index b1aa66bd..95a1030e 100644 --- a/tests/fuzzed/id_000432,sig_06,src_002653,time_201357285,execs_824741,op_quick,pos_1391.buzz +++ b/tests/fuzzed/id_000432,sig_06,src_002653,time_201357285,execs_824741,op_quick,pos_1391.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000433,sig_06,src_001350,time_201706085,execs_825883,op_quick,pos_25.buzz b/tests/fuzzed/id_000433,sig_06,src_001350,time_201706085,execs_825883,op_quick,pos_25.buzz index f78bbd75..fd613c63 100644 --- a/tests/fuzzed/id_000433,sig_06,src_001350,time_201706085,execs_825883,op_quick,pos_25.buzz +++ b/tests/fuzzed/id_000433,sig_06,src_001350,time_201706085,execs_825883,op_quick,pos_25.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol CHmparable { fun greater(than: Comparable) > bool; diff --git a/tests/fuzzed/id_000434,sig_06,src_000723,time_202384530,execs_828228,op_arith8,pos_276,val_-1.buzz b/tests/fuzzed/id_000434,sig_06,src_000723,time_202384530,execs_828228,op_arith8,pos_276,val_-1.buzz index 7256075d..e522c02d 100644 --- a/tests/fuzzed/id_000434,sig_06,src_000723,time_202384530,execs_828228,op_arith8,pos_276,val_-1.buzz +++ b/tests/fuzzed/id_000434,sig_06,src_000723,time_202384530,execs_828228,op_arith8,pos_276,val_-1.buzz @@ -1,5 +1,5 @@ -import "std"; -import "gc"; +import "buzz:std"; +import "buzz:gc"; var collectorCalled = false; diff --git a/tests/fuzzed/id_000435,sig_06,src_001769,time_204369834,execs_835857,op_quick,pos_1455.buzz b/tests/fuzzed/id_000435,sig_06,src_001769,time_204369834,execs_835857,op_quick,pos_1455.buzz index 62b58342..78ba1849 100644 --- a/tests/fuzzed/id_000435,sig_06,src_001769,time_204369834,execs_835857,op_quick,pos_1455.buzz +++ b/tests/fuzzed/id_000435,sig_06,src_001769,time_204369834,execs_835857,op_quick,pos_1455.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Composite operators on scalar" { var a = 1; diff --git a/tests/fuzzed/id_000436,sig_06,src_000962,time_204828758,execs_837480,op_quick,pos_24.buzz b/tests/fuzzed/id_000436,sig_06,src_000962,time_204828758,execs_837480,op_quick,pos_24.buzz index 5a4d7573..d0376584 100644 --- a/tests/fuzzed/id_000436,sig_06,src_000962,time_204828758,execs_837480,op_quick,pos_24.buzz +++ b/tests/fuzzed/id_000436,sig_06,src_000962,time_204828758,execs_837480,op_quick,pos_24.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Padload:: { data: mut={K: V}, diff --git a/tests/fuzzed/id_000437,sig_06,src_003062,time_208242945,execs_849859,op_quick,pos_1289.buzz b/tests/fuzzed/id_000437,sig_06,src_003062,time_208242945,execs_849859,op_quick,pos_1289.buzz index 17f799bb..3e20cd2a 100644 --- a/tests/fuzzed/id_000437,sig_06,src_003062,time_208242945,execs_849859,op_quick,pos_1289.buzz +++ b/tests/fuzzed/id_000437,sig_06,src_003062,time_208242945,execs_849859,op_quick,pos_1289.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000438,sig_06,src_002599,time_209225042,execs_854084,op_quick,pos_1203.buzz b/tests/fuzzed/id_000438,sig_06,src_002599,time_209225042,execs_854084,op_quick,pos_1203.buzz index afa61159..877ac3ae 100644 --- a/tests/fuzzed/id_000438,sig_06,src_002599,time_209225042,execs_854084,op_quick,pos_1203.buzz +++ b/tests/fuzzed/id_000438,sig_06,src_002599,time_209225042,execs_854084,op_quick,pos_1203.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000439,sig_06,src_002667,time_210343357,execs_857721,op_quick,pos_1260.buzz b/tests/fuzzed/id_000439,sig_06,src_002667,time_210343357,execs_857721,op_quick,pos_1260.buzz index b12366e0..db824ad0 100644 --- a/tests/fuzzed/id_000439,sig_06,src_002667,time_210343357,execs_857721,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000439,sig_06,src_002667,time_210343357,execs_857721,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000440,sig_06,src_000052,time_210997661,execs_860745,op_quick,pos_354.buzz b/tests/fuzzed/id_000440,sig_06,src_000052,time_210997661,execs_860745,op_quick,pos_354.buzz index 51c14d00..b719f698 100644 --- a/tests/fuzzed/id_000440,sig_06,src_000052,time_210997661,execs_860745,op_quick,pos_354.buzz +++ b/tests/fuzzed/id_000440,sig_06,src_000052,time_210997661,execs_860745,op_quick,pos_354.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; object Person { name: str, diff --git a/tests/fuzzed/id_000441,sig_06,src_001993,time_213386640,execs_870338,op_quick,pos_1166.buzz b/tests/fuzzed/id_000441,sig_06,src_001993,time_213386640,execs_870338,op_quick,pos_1166.buzz index f9135a21..b80af0ea 100644 --- a/tests/fuzzed/id_000441,sig_06,src_001993,time_213386640,execs_870338,op_quick,pos_1166.buzz +++ b/tests/fuzzed/id_000441,sig_06,src_001993,time_213386640,execs_870338,op_quick,pos_1166.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000442,sig_06,src_001993,time_213422391,execs_870432,op_quick,pos_1260.buzz b/tests/fuzzed/id_000442,sig_06,src_001993,time_213422391,execs_870432,op_quick,pos_1260.buzz index 6dec5fda..1e2ac196 100644 --- a/tests/fuzzed/id_000442,sig_06,src_001993,time_213422391,execs_870432,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000442,sig_06,src_001993,time_213422391,execs_870432,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000443,sig_06,src_000004,time_214461874,execs_873986,op_quick,pos_1005.buzz b/tests/fuzzed/id_000443,sig_06,src_000004,time_214461874,execs_873986,op_quick,pos_1005.buzz index f52a758b..e118a7fe 100644 --- a/tests/fuzzed/id_000443,sig_06,src_000004,time_214461874,execs_873986,op_quick,pos_1005.buzz +++ b/tests/fuzzed/id_000443,sig_06,src_000004,time_214461874,execs_873986,op_quick,pos_1005.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000444,sig_06,src_000004,time_214570605,execs_874386,op_quick,pos_1379.buzz b/tests/fuzzed/id_000444,sig_06,src_000004,time_214570605,execs_874386,op_quick,pos_1379.buzz index 4684b9c9..84ab6f46 100644 --- a/tests/fuzzed/id_000444,sig_06,src_000004,time_214570605,execs_874386,op_quick,pos_1379.buzz +++ b/tests/fuzzed/id_000444,sig_06,src_000004,time_214570605,execs_874386,op_quick,pos_1379.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000445,sig_06,src_003127,time_215881159,execs_879003,op_quick,pos_1804,val_+7.buzz b/tests/fuzzed/id_000445,sig_06,src_003127,time_215881159,execs_879003,op_quick,pos_1804,val_+7.buzz index e0a8544c..12681918 100644 --- a/tests/fuzzed/id_000445,sig_06,src_003127,time_215881159,execs_879003,op_quick,pos_1804,val_+7.buzz +++ b/tests/fuzzed/id_000445,sig_06,src_003127,time_215881159,execs_879003,op_quick,pos_1804,val_+7.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000446,sig_11,src_003127,time_215934009,execs_879173,op_quick,pos_1974,val_+7.buzz b/tests/fuzzed/id_000446,sig_11,src_003127,time_215934009,execs_879173,op_quick,pos_1974,val_+7.buzz index bea31679..a3e913e8 100644 --- a/tests/fuzzed/id_000446,sig_11,src_003127,time_215934009,execs_879173,op_quick,pos_1974,val_+7.buzz +++ b/tests/fuzzed/id_000446,sig_11,src_003127,time_215934009,execs_879173,op_quick,pos_1974,val_+7.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000447,sig_06,src_003127,time_215979354,execs_879333,op_flip32,pos_155.buzz b/tests/fuzzed/id_000447,sig_06,src_003127,time_215979354,execs_879333,op_flip32,pos_155.buzz index c7fab5b9..624a34c9 100644 --- a/tests/fuzzed/id_000447,sig_06,src_003127,time_215979354,execs_879333,op_flip32,pos_155.buzz +++ b/tests/fuzzed/id_000447,sig_06,src_003127,time_215979354,execs_879333,op_flip32,pos_155.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; test "Maps" { final map = mut { diff --git a/tests/fuzzed/id_000448,sig_06,src_002583,time_219216696,execs_890847,op_quick,pos_1260.buzz b/tests/fuzzed/id_000448,sig_06,src_002583,time_219216696,execs_890847,op_quick,pos_1260.buzz index 464e8f06..24f0557d 100644 --- a/tests/fuzzed/id_000448,sig_06,src_002583,time_219216696,execs_890847,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000448,sig_06,src_002583,time_219216696,execs_890847,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/fuzzed/id_000449,sig_06,src_000060,time_220362784,execs_895852,op_quick,pos_47.buzz b/tests/fuzzed/id_000449,sig_06,src_000060,time_220362784,execs_895852,op_quick,pos_47.buzz index 39a3c2be..6605947b 100644 --- a/tests/fuzzed/id_000449,sig_06,src_000060,time_220362784,execs_895852,op_quick,pos_47.buzz +++ b/tests/fuzzed/id_000449,sig_06,src_000060,time_220362784,execs_895852,op_quick,pos_47.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :sr, :str, :str } { return .{ diff --git a/tests/fuzzed/id_000450,sig_06,src_000060,time_220369367,execs_895883,op_quick,pos_54.buzz b/tests/fuzzed/id_000450,sig_06,src_000060,time_220369367,execs_895883,op_quick,pos_54.buzz index b3765d49..11cbba23 100644 --- a/tests/fuzzed/id_000450,sig_06,src_000060,time_220369367,execs_895883,op_quick,pos_54.buzz +++ b/tests/fuzzed/id_000450,sig_06,src_000060,time_220369367,execs_895883,op_quick,pos_54.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str, :st, :str } { return .{ diff --git a/tests/fuzzed/id_000451,sig_06,src_000060,time_220370374,execs_895888,op_quick,pos_59.buzz b/tests/fuzzed/id_000451,sig_06,src_000060,time_220370374,execs_895888,op_quick,pos_59.buzz index 1e4bb1be..ce4c83bb 100644 --- a/tests/fuzzed/id_000451,sig_06,src_000060,time_220370374,execs_895888,op_quick,pos_59.buzz +++ b/tests/fuzzed/id_000451,sig_06,src_000060,time_220370374,execs_895888,op_quick,pos_59.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str, :str, :sr } { return .{ diff --git a/tests/fuzzed/id_000452,sig_06,src_000060,time_220494544,execs_896448,op_flip1,pos_132.buzz b/tests/fuzzed/id_000452,sig_06,src_000060,time_220494544,execs_896448,op_flip1,pos_132.buzz index 7402041b..05051345 100644 --- a/tests/fuzzed/id_000452,sig_06,src_000060,time_220494544,execs_896448,op_flip1,pos_132.buzz +++ b/tests/fuzzed/id_000452,sig_06,src_000060,time_220494544,execs_896448,op_flip1,pos_132.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str, :str, :str } { return .{ diff --git a/tests/fuzzed/id_000453,sig_06,src_000060,time_220510164,execs_896521,op_flip2,pos_347.buzz b/tests/fuzzed/id_000453,sig_06,src_000060,time_220510164,execs_896521,op_flip2,pos_347.buzz index 5a52c411..e98cedc0 100644 --- a/tests/fuzzed/id_000453,sig_06,src_000060,time_220510164,execs_896521,op_flip2,pos_347.buzz +++ b/tests/fuzzed/id_000453,sig_06,src_000060,time_220510164,execs_896521,op_flip2,pos_347.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str, :str, :str } { return .{ diff --git a/tests/fuzzed/id_000454,sig_06,src_003151,time_221247072,execs_900392,op_quick,pos_60.buzz b/tests/fuzzed/id_000454,sig_06,src_003151,time_221247072,execs_900392,op_quick,pos_60.buzz index 0004990a..1aad1c59 100644 --- a/tests/fuzzed/id_000454,sig_06,src_003151,time_221247072,execs_900392,op_quick,pos_60.buzz +++ b/tests/fuzzed/id_000454,sig_06,src_003151,time_221247072,execs_900392,op_quick,pos_60.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str,L:str, :st } { return .{ diff --git a/tests/fuzzed/id_000455,sig_06,src_003151,time_221475319,execs_901376,op_havoc,rep_1.buzz b/tests/fuzzed/id_000455,sig_06,src_003151,time_221475319,execs_901376,op_havoc,rep_1.buzz index 66d47b77..9de27c41 100644 --- a/tests/fuzzed/id_000455,sig_06,src_003151,time_221475319,execs_901376,op_havoc,rep_1.buzz +++ b/tests/fuzzed/id_000455,sig_06,src_003151,time_221475319,execs_901376,op_havoc,rep_1.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun pack(names: [str]) > obj{ :str,L:str, :str } { return .{ diff --git a/tests/fuzzed/id_000456,sig_06,src_001977,time_223576476,execs_909947,op_quick,pos_1260.buzz b/tests/fuzzed/id_000456,sig_06,src_001977,time_223576476,execs_909947,op_quick,pos_1260.buzz index dfa69547..6d261ff6 100644 --- a/tests/fuzzed/id_000456,sig_06,src_001977,time_223576476,execs_909947,op_quick,pos_1260.buzz +++ b/tests/fuzzed/id_000456,sig_06,src_001977,time_223576476,execs_909947,op_quick,pos_1260.buzz @@ -1,5 +1,5 @@ -import "std"; -import "debug"; +import "buzz:std"; +import "buzz:debug"; object A {} diff --git a/tests/manual/cli-args.buzz b/tests/manual/cli-args.buzz index 52570751..d819358f 100644 --- a/tests/manual/cli-args.buzz +++ b/tests/manual/cli-args.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; fun main(args: [str]) > void { foreach (index, arg in args) { diff --git a/tests/manual/debug-me.buzz b/tests/manual/debug-me.buzz index 3bf39bc1..d952a8ea 100644 --- a/tests/manual/debug-me.buzz +++ b/tests/manual/debug-me.buzz @@ -1,4 +1,4 @@ -import "std"; +import "buzz:std"; protocol Sum { fun sum() > int; diff --git a/tests/manual/fd-poller.buzz b/tests/manual/fd-poller.buzz index d214d476..3569224f 100644 --- a/tests/manual/fd-poller.buzz +++ b/tests/manual/fd-poller.buzz @@ -1,5 +1,5 @@ -import "std"; -import "io"; +import "buzz:std"; +import "buzz:io"; fun main() > void !> any { final poller = io\stdin.getPoller(); diff --git a/tests/manual/http-client.buzz b/tests/manual/http-client.buzz index 1187718c..51d7c0ca 100644 --- a/tests/manual/http-client.buzz +++ b/tests/manual/http-client.buzz @@ -1,6 +1,6 @@ -import "http" as _; -import "debug"; -import "errors"; +import "buzz:http" as _; +import "buzz:debug"; +import "buzz:errors"; fun main() > void !> any { final client = Client.init(); diff --git a/tests/manual/io.buzz b/tests/manual/io.buzz index 3c4f074f..a5699467 100644 --- a/tests/manual/io.buzz +++ b/tests/manual/io.buzz @@ -1,5 +1,5 @@ -import "std"; -import "io"; +import "buzz:std"; +import "buzz:io"; fun main() > void !> any { for (line: str? = ""; line != null; line = io\stdin.readLine()) { diff --git a/tests/manual/os.buzz b/tests/manual/os.buzz index c911a52e..e5913db7 100644 --- a/tests/manual/os.buzz +++ b/tests/manual/os.buzz @@ -1,4 +1,4 @@ -import "os"; +import "buzz:os"; fun main() > void { os\exit(12); diff --git a/tests/manual/tcp-client.buzz b/tests/manual/tcp-client.buzz index 4b1e972f..0c394cff 100644 --- a/tests/manual/tcp-client.buzz +++ b/tests/manual/tcp-client.buzz @@ -1,5 +1,5 @@ -import "std"; -import "os"; +import "buzz:std"; +import "buzz:os"; fun main() > void !> any { final socket = os\Socket.connect( diff --git a/tests/manual/write-file.buzz b/tests/manual/write-file.buzz index d615beca..a6133c5c 100644 --- a/tests/manual/write-file.buzz +++ b/tests/manual/write-file.buzz @@ -1,4 +1,4 @@ -import "io"; +import "buzz:io"; final list = [ 1, 2, 3 ]; diff --git a/tests/utils/import-b.buzz b/tests/utils/import-b.buzz index 289be82c..3671f63c 100644 --- a/tests/utils/import-b.buzz +++ b/tests/utils/import-b.buzz @@ -1,7 +1,7 @@ namespace b; -import "tests/utils/import-a"; -import "std"; +import "import-a"; +import "buzz:std"; var hello = a\Hello{ message = "hello world" }; diff --git a/tests/utils/testing.buzz b/tests/utils/testing.buzz index 5902a6b2..6c9dc1a8 100644 --- a/tests/utils/testing.buzz +++ b/tests/utils/testing.buzz @@ -1,6 +1,6 @@ namespace testing; -import "std"; +import "buzz:std"; final unexported = 42;