| ... | @@ -858,6 +858,12 @@ fn buildOutputType( | ... | @@ -858,6 +858,12 @@ fn buildOutputType( |
| 858 | ) catch |err| { | 858 | ) catch |err| { |
| 859 | fatal("Failed to add package at path {s}: {s}", .{ pkg_path.?, @errorName(err) }); | 859 | fatal("Failed to add package at path {s}: {s}", .{ pkg_path.?, @errorName(err) }); |
| 860 | }; | 860 | }; |
| | 861 | |
| | 862 | if (mem.eql(u8, pkg_name.?, "std") or mem.eql(u8, pkg_name.?, "root") or mem.eql(u8, pkg_name.?, "builtin")) { |
| | 863 | fatal("unable to add package '{s}' -> '{s}': conflicts with builtin package", .{ pkg_name.?, pkg_path.? }); |
| | 864 | } else if (cur_pkg.table.get(pkg_name.?)) |prev| { |
| | 865 | fatal("unable to add package '{s}' -> '{s}': already exists as '{s}", .{ pkg_name.?, pkg_path.?, prev.root_src_path }); |
| | 866 | } |
| 861 | try cur_pkg.addAndAdopt(gpa, pkg_name.?, new_cur_pkg); | 867 | try cur_pkg.addAndAdopt(gpa, pkg_name.?, new_cur_pkg); |
| 862 | cur_pkg = new_cur_pkg; | 868 | cur_pkg = new_cur_pkg; |
| 863 | } else if (mem.eql(u8, arg, "--pkg-end")) { | 869 | } else if (mem.eql(u8, arg, "--pkg-end")) { |