mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
revert sourcemap-related logging change (#11510)
This commit is contained in:
@@ -286,7 +286,6 @@ pub const Mapping = struct {
|
||||
base_filename,
|
||||
lookup.source_map.underlying_provider.load_hint,
|
||||
.{ .source_only = @intCast(index) },
|
||||
null,
|
||||
)) |parsed|
|
||||
if (parsed.source_contents) |contents|
|
||||
break :bytes contents;
|
||||
@@ -723,7 +722,6 @@ pub const SourceProviderMap = opaque {
|
||||
source_filename: []const u8,
|
||||
load_hint: SourceMapLoadHint,
|
||||
result: ParseUrlResultHint,
|
||||
log: ?*Logger.Log,
|
||||
) ?SourceMap.ParseUrl {
|
||||
var sfb = std.heap.stackFallback(65536, bun.default_allocator);
|
||||
var arena = bun.ArenaAllocator.init(sfb.get());
|
||||
@@ -781,18 +779,14 @@ pub const SourceProviderMap = opaque {
|
||||
data,
|
||||
result,
|
||||
) catch |err| {
|
||||
if (log) |l|
|
||||
l.addWarningFmt(
|
||||
null,
|
||||
Logger.Loc.Empty,
|
||||
bun.default_allocator,
|
||||
"Could not decode sourcemap '{s}': {s}",
|
||||
.{
|
||||
source_filename,
|
||||
@errorName(err),
|
||||
},
|
||||
) catch {};
|
||||
// Disable the "try using --sourcemap=external" hint
|
||||
// Print warning even if this came from non-visible code like
|
||||
// calling `error.stack`. This message is only printed if
|
||||
// the sourcemap has been found but is invalid, such as being
|
||||
// invalid JSON text or corrupt mappings.
|
||||
bun.Output.warn("Could not decode sourcemap in '{s}': {s}", .{
|
||||
source_filename,
|
||||
@errorName(err),
|
||||
}); // Disable the "try using --sourcemap=external" hint
|
||||
bun.JSC.SavedSourceMap.MissingSourceMapNoteInfo.seen_invalid = true;
|
||||
return null;
|
||||
},
|
||||
@@ -800,17 +794,10 @@ pub const SourceProviderMap = opaque {
|
||||
}
|
||||
|
||||
if (inline_err) |err| {
|
||||
if (log) |l|
|
||||
l.addWarningFmt(
|
||||
null,
|
||||
Logger.Loc.Empty,
|
||||
bun.default_allocator,
|
||||
"Could not decode sourcemap in '{s}': {s}",
|
||||
.{
|
||||
source_filename,
|
||||
@errorName(err),
|
||||
},
|
||||
) catch {};
|
||||
bun.Output.warn("Could not decode sourcemap in '{s}': {s}", .{
|
||||
source_filename,
|
||||
@errorName(err),
|
||||
});
|
||||
// Disable the "try using --sourcemap=external" hint
|
||||
bun.JSC.SavedSourceMap.MissingSourceMapNoteInfo.seen_invalid = true;
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user