feat: Better resolution error hints#2404
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:
Dynamic test results:
|
| Test | tsdown |
|---|---|
| WgslGenerator from typegpu.ts | 104.95 kB ( |
| tgpu from typegpu.ts | 254.84 kB ( |
| tgpu.fn from typegpu.ts | 254.85 kB ( |
| tgpu.init from typegpu.ts | 254.85 kB ( |
| tgpu.lazy from typegpu.ts | 254.85 kB ( |
| tgpu.slot from typegpu.ts | 254.85 kB ( |
| tgpu.const from typegpu.ts | 254.85 kB ( |
| tgpu.unroll from typegpu.ts | 254.85 kB ( |
| tgpu.resolve from typegpu.ts | 254.85 kB ( |
| tgpu.accessor from typegpu.ts | 254.85 kB ( |
| tgpu.comptime from typegpu.ts | 254.85 kB ( |
| tgpu.vertexFn from typegpu.ts | 254.85 kB ( |
| tgpu.computeFn from typegpu.ts | 254.85 kB ( |
| tgpu.fragmentFn from typegpu.ts | 254.86 kB ( |
| tgpu.privateVar from typegpu.ts | 254.86 kB ( |
| tgpu.vertexLayout from typegpu.ts | 254.86 kB ( |
| tgpu.workgroupVar from typegpu.ts | 254.86 kB ( |
| tgpu.initFromDevice from typegpu.ts | 254.86 kB ( |
| tgpu.bindGroupLayout from typegpu.ts | 254.86 kB ( |
| tgpu.mutableAccessor from typegpu.ts | 254.86 kB ( |
| tgpu.resolveWithContext from typegpu.ts | 254.86 kB ( |
📋 All results
Click to reveal the results table (350 entries).
| Test | tsdown |
|---|---|
| WgslGenerator from typegpu.ts | 104.95 kB ( |
| tgpuImportEverything.ts | 254.84 kB ( |
| tgpu from typegpu.ts | 254.84 kB ( |
| tgpu.fn from typegpu.ts | 254.85 kB ( |
| tgpu.init from typegpu.ts | 254.85 kB ( |
| tgpu.lazy from typegpu.ts | 254.85 kB ( |
| tgpu.slot from typegpu.ts | 254.85 kB ( |
| tgpu.const from typegpu.ts | 254.85 kB ( |
| tgpu.unroll from typegpu.ts | 254.85 kB ( |
| tgpu.resolve from typegpu.ts | 254.85 kB ( |
| tgpu.accessor from typegpu.ts | 254.85 kB ( |
| tgpu.comptime from typegpu.ts | 254.85 kB ( |
| tgpu.vertexFn from typegpu.ts | 254.85 kB ( |
| tgpu.computeFn from typegpu.ts | 254.85 kB ( |
| tgpu.fragmentFn from typegpu.ts | 254.86 kB ( |
| tgpu.privateVar from typegpu.ts | 254.86 kB ( |
| tgpuImportOne.ts | 254.86 kB ( |
| tgpu.vertexLayout from typegpu.ts | 254.86 kB ( |
| tgpu.workgroupVar from typegpu.ts | 254.86 kB ( |
| tgpu.initFromDevice from typegpu.ts | 254.86 kB ( |
| tgpu.bindGroupLayout from typegpu.ts | 254.86 kB ( |
| tgpu.mutableAccessor from typegpu.ts | 254.86 kB ( |
| tgpu.resolveWithContext from typegpu.ts | 254.86 kB ( |
| importEntireLibrary.ts | 282.10 kB ( |
| dataImportEverything.ts | 86.96 kB (➖) |
| dataImportOneDirect.ts | 22.52 kB (➖) |
| dataImportOneStar.ts | 22.52 kB (➖) |
| functionWithUseGpu.ts | 282 B (➖) |
| functionWithoutUseGpu.ts | 24 B (➖) |
| stdImportEverything.ts | 102.33 kB (➖) |
| stdImportOneDirect.ts | 46.10 kB (➖) |
| stdImportOneStar.ts | 46.10 kB (➖) |
| MissingBindGroupsError from typegpu.ts | 1.34 kB (➖) |
| MissingLinksError from typegpu.ts | 201 B (➖) |
| MissingSlotValueError from typegpu.ts | 151 B (➖) |
| MissingVertexBuffersError from typegpu.ts | 1.35 kB (➖) |
| NotUniformError from typegpu.ts | 1.30 kB (➖) |
| ResolutionError from typegpu.ts | 1.55 kB (➖) |
| ShaderGenerator from typegpu.ts | 552 B (➖) |
| Void from typegpudata.ts | 734 B (➖) |
| abs from typegpustd.ts | 63.41 kB (➖) |
| acos from typegpustd.ts | 63.41 kB (➖) |
| acosh from typegpustd.ts | 63.41 kB (➖) |
| add from typegpustd.ts | 46.10 kB (➖) |
| align from typegpudata.ts | 24.21 kB (➖) |
| alignmentOf from typegpudata.ts | 19.75 kB (➖) |
| allEq from typegpustd.ts | 49.04 kB (➖) |
| all from typegpustd.ts | 49.04 kB (➖) |
| and from typegpustd.ts | 49.04 kB (➖) |
| any from typegpustd.ts | 49.05 kB (➖) |
| arrayLength from typegpustd.ts | 12.25 kB (➖) |
| arrayOf from typegpudata.ts | 24.01 kB (➖) |
| asin from typegpustd.ts | 63.41 kB (➖) |
| asinh from typegpustd.ts | 63.41 kB (➖) |
| atan2 from typegpustd.ts | 63.41 kB (➖) |
| atan from typegpustd.ts | 63.41 kB (➖) |
| atanh from typegpustd.ts | 63.41 kB (➖) |
| atomicAdd from typegpustd.ts | 13.61 kB (➖) |
| atomicAnd from typegpustd.ts | 13.61 kB (➖) |
| atomicLoad from typegpustd.ts | 13.60 kB (➖) |
| atomicMax from typegpustd.ts | 13.61 kB (➖) |
| atomicMin from typegpustd.ts | 13.61 kB (➖) |
| atomicOr from typegpustd.ts | 13.61 kB (➖) |
| atomicStore from typegpustd.ts | 13.61 kB (➖) |
| atomicSub from typegpustd.ts | 13.61 kB (➖) |
| atomicXor from typegpustd.ts | 13.61 kB (➖) |
| atomic from typegpudata.ts | 779 B (➖) |
| bitShiftLeft from typegpustd.ts | 46.10 kB (➖) |
| bitShiftRight from typegpustd.ts | 46.10 kB (➖) |
| bitcastU32toF32 from typegpustd.ts | 41.92 kB (➖) |
| bitcastU32toI32 from typegpustd.ts | 41.93 kB (➖) |
| bool from typegpudata.ts | 10.80 kB (➖) |
| builtin from typegpudata.ts | 26.39 kB (➖) |
| ceil from typegpustd.ts | 63.41 kB (➖) |
| clamp from typegpustd.ts | 63.41 kB (➖) |
| common from typegpu.ts | 53.43 kB (➖) |
| comparisonSampler from typegpudata.ts | 753 B (➖) |
| cos from typegpustd.ts | 63.41 kB (➖) |
| cosh from typegpustd.ts | 63.41 kB (➖) |
| countLeadingZeros from typegpustd.ts | 63.41 kB (➖) |
| countOneBits from typegpustd.ts | 63.41 kB (➖) |
| countTrailingZeros from typegpustd.ts | 63.41 kB (➖) |
| cross from typegpustd.ts | 63.41 kB (➖) |
| d from typegpu.ts | 84.65 kB (➖) |
| deepEqual from typegpudata.ts | 2.19 kB (➖) |
| degrees from typegpustd.ts | 63.41 kB (➖) |
| determinant from typegpustd.ts | 63.41 kB (➖) |
| disarrayOf from typegpudata.ts | 12.78 kB (➖) |
| discard from typegpustd.ts | 12.00 kB (➖) |
| distance from typegpustd.ts | 63.40 kB (➖) |
| div from typegpustd.ts | 46.10 kB (➖) |
| dot4I8Packed from typegpustd.ts | 63.41 kB (➖) |
| dot4U8Packed from typegpustd.ts | 63.40 kB (➖) |
| dot from typegpustd.ts | 63.40 kB (➖) |
| dpdxCoarse from typegpustd.ts | 12.85 kB (➖) |
| dpdxFine from typegpustd.ts | 12.85 kB (➖) |
| dpdx from typegpustd.ts | 12.84 kB (➖) |
| dpdyCoarse from typegpustd.ts | 12.85 kB (➖) |
| dpdyFine from typegpustd.ts | 12.85 kB (➖) |
| dpdy from typegpustd.ts | 12.85 kB (➖) |
| eq from typegpustd.ts | 49.04 kB (➖) |
| exp2 from typegpustd.ts | 63.41 kB (➖) |
| exp from typegpustd.ts | 63.41 kB (➖) |
| extensionEnabled from typegpustd.ts | 12.34 kB (➖) |
| extractBits from typegpustd.ts | 63.41 kB (➖) |
| f16 from typegpudata.ts | 10.80 kB (➖) |
| f32 from typegpudata.ts | 10.80 kB (➖) |
| faceForward from typegpustd.ts | 63.41 kB (➖) |
| firstLeadingBit from typegpustd.ts | 63.41 kB (➖) |
| firstTrailingBit from typegpustd.ts | 63.41 kB (➖) |
| float16 from typegpudata.ts | 18.71 kB (➖) |
| float16x2 from typegpudata.ts | 18.71 kB (➖) |
| float16x4 from typegpudata.ts | 18.71 kB (➖) |
| float32 from typegpudata.ts | 18.71 kB (➖) |
| float32x2 from typegpudata.ts | 18.71 kB (➖) |
| float32x3 from typegpudata.ts | 18.71 kB (➖) |
| float32x4 from typegpudata.ts | 18.71 kB (➖) |
| floor from typegpustd.ts | 63.41 kB (➖) |
| fma from typegpustd.ts | 63.41 kB (➖) |
| formatToWGSLType from typegpudata.ts | 18.70 kB (➖) |
| fract from typegpustd.ts | 63.40 kB (➖) |
| frexp from typegpustd.ts | 63.40 kB (➖) |
| fwidthCoarse from typegpustd.ts | 12.85 kB (➖) |
| fwidthFine from typegpustd.ts | 12.85 kB (➖) |
| fwidth from typegpustd.ts | 12.85 kB (➖) |
| ge from typegpustd.ts | 49.05 kB (➖) |
| getLongestContiguousPrefix from typegpudata.ts | 22.54 kB (➖) |
| gt from typegpustd.ts | 49.05 kB (➖) |
| i32 from typegpudata.ts | 10.80 kB (➖) |
| identity2 from typegpustd.ts | 24.73 kB (➖) |
| identity3 from typegpustd.ts | 24.73 kB (➖) |
| identity4 from typegpustd.ts | 24.73 kB (➖) |
| insertBits from typegpustd.ts | 63.41 kB (➖) |
| interpolate from typegpudata.ts | 24.21 kB (➖) |
| invariant from typegpudata.ts | 24.58 kB (➖) |
| inverseSqrt from typegpustd.ts | 63.41 kB (➖) |
| isAccessor from typegpu.ts | 65 B (➖) |
| isAlignAttrib from typegpudata.ts | 755 B (➖) |
| isAtomic from typegpudata.ts | 755 B (➖) |
| isBufferShorthand from typegpu.ts | 1.81 kB (➖) |
| isBuffer from typegpu.ts | 86.54 kB (➖) |
| isBuiltinAttrib from typegpudata.ts | 757 B (➖) |
| isBuiltin from typegpudata.ts | 22.47 kB (➖) |
| isCloseTo from typegpustd.ts | 49.05 kB (➖) |
| isComparisonSampler from typegpu.ts | 60.99 kB (➖) |
| isContiguous from typegpudata.ts | 22.53 kB (➖) |
| isData from typegpudata.ts | 1.81 kB (➖) |
| isDecorated from typegpudata.ts | 758 B (➖) |
| isDisarray from typegpudata.ts | 1.11 kB (➖) |
| isInterpolateAttrib from typegpudata.ts | 761 B (➖) |
| isLazy from typegpu.ts | 61 B (➖) |
| isLocationAttrib from typegpudata.ts | 758 B (➖) |
| isLooseData from typegpudata.ts | 1.16 kB (➖) |
| isLooseDecorated from typegpudata.ts | 1.12 kB (➖) |
| isMutableAccessor from typegpu.ts | 73 B (➖) |
| isPackedData from typegpudata.ts | 18.77 kB (➖) |
| isPtr from typegpudata.ts | 752 B (➖) |
| isSampler from typegpu.ts | 60.97 kB (➖) |
| isSizeAttrib from typegpudata.ts | 754 B (➖) |
| isSlot from typegpu.ts | 61 B (➖) |
| isTexture from typegpu.ts | 60.97 kB (➖) |
| isTgpuComputeFn from typegpu.ts | 69 B (➖) |
| isTgpuFn from typegpu.ts | 765 B (➖) |
| isTgpuFragmentFn from typegpu.ts | 70 B (➖) |
| isTgpuVertexFn from typegpu.ts | 68 B (➖) |
| isUnstruct from typegpudata.ts | 1.11 kB (➖) |
| isUsableAsRender from typegpu.ts | 55 B (➖) |
| isUsableAsSampled from typegpu.ts | 56 B (➖) |
| isUsableAsStorage from typegpu.ts | 56 B (➖) |
| isUsableAsUniform from typegpu.ts | 60.96 kB (➖) |
| isUsableAsVertex from typegpu.ts | 86.53 kB (➖) |
| isVariable from typegpu.ts | 62.76 kB (➖) |
| isWgslArray from typegpudata.ts | 754 B (➖) |
| isWgslData from typegpudata.ts | 1.31 kB (➖) |
| isWgslStruct from typegpudata.ts | 755 B (➖) |
| ldexp from typegpustd.ts | 63.41 kB (➖) |
| le from typegpustd.ts | 49.05 kB (➖) |
| length from typegpustd.ts | 63.40 kB (➖) |
| location from typegpudata.ts | 24.21 kB (➖) |
| log2 from typegpustd.ts | 63.41 kB (➖) |
| log from typegpustd.ts | 63.41 kB (➖) |
| lt from typegpustd.ts | 49.04 kB (➖) |
| mat2x2f from typegpudata.ts | 24.73 kB (➖) |
| mat3x3f from typegpudata.ts | 24.73 kB (➖) |
| mat4x4f from typegpudata.ts | 24.73 kB (➖) |
| matToArray from typegpudata.ts | 24.86 kB (➖) |
| max from typegpustd.ts | 63.41 kB (➖) |
| memoryLayoutOf from typegpudata.ts | 39.84 kB (➖) |
| min from typegpustd.ts | 63.41 kB (➖) |
| mix from typegpustd.ts | 63.40 kB (➖) |
| mod from typegpustd.ts | 46.10 kB (➖) |
| modf from typegpustd.ts | 63.40 kB (➖) |
| mul from typegpustd.ts | 46.10 kB (➖) |
| ne from typegpustd.ts | 49.04 kB (➖) |
| neg from typegpustd.ts | 46.09 kB (➖) |
| normalize from typegpustd.ts | 63.41 kB (➖) |
| not from typegpustd.ts | 49.04 kB (➖) |
| or from typegpustd.ts | 49.04 kB (➖) |
| pack2x16float from typegpustd.ts | 33.74 kB (➖) |
| pack4x8unorm from typegpustd.ts | 33.74 kB (➖) |
| packedFormats from typegpudata.ts | 18.73 kB (➖) |
| pow from typegpustd.ts | 63.41 kB (➖) |
| ptrFn from typegpudata.ts | 859 B (➖) |
| ptrHandle from typegpudata.ts | 851 B (➖) |
| ptrPrivate from typegpudata.ts | 858 B (➖) |
| ptrStorage from typegpudata.ts | 856 B (➖) |
| ptrUniform from typegpudata.ts | 852 B (➖) |
| ptrWorkgroup from typegpudata.ts | 860 B (➖) |
| quantizeToF16 from typegpustd.ts | 63.41 kB (➖) |
| radians from typegpustd.ts | 63.41 kB (➖) |
| range from typegpustd.ts | 12.61 kB (➖) |
| ref from typegpudata.ts | 4.18 kB (➖) |
| reflect from typegpustd.ts | 63.41 kB (➖) |
| refract from typegpustd.ts | 63.41 kB (➖) |
| reverseBits from typegpustd.ts | 63.41 kB (➖) |
| rotateX4 from typegpustd.ts | 46.86 kB (➖) |
| rotateY4 from typegpustd.ts | 46.87 kB (➖) |
| rotateZ4 from typegpustd.ts | 46.87 kB (➖) |
| rotationX4 from typegpustd.ts | 24.73 kB (➖) |
| rotationY4 from typegpustd.ts | 24.73 kB (➖) |
| rotationZ4 from typegpustd.ts | 24.73 kB (➖) |
| round from typegpustd.ts | 63.41 kB (➖) |
| sampler from typegpudata.ts | 742 B (➖) |
| saturate from typegpustd.ts | 63.41 kB (➖) |
| scale4 from typegpustd.ts | 46.86 kB (➖) |
| scaling4 from typegpustd.ts | 24.73 kB (➖) |
| select from typegpustd.ts | 49.05 kB (➖) |
| sign from typegpustd.ts | 63.41 kB (➖) |
| sin from typegpustd.ts | 63.41 kB (➖) |
| sinh from typegpustd.ts | 63.41 kB (➖) |
| sint16 from typegpudata.ts | 18.71 kB (➖) |
| sint16x2 from typegpudata.ts | 18.71 kB (➖) |
| sint16x4 from typegpudata.ts | 18.71 kB (➖) |
| sint32 from typegpudata.ts | 18.71 kB (➖) |
| sint32x2 from typegpudata.ts | 18.71 kB (➖) |
| sint32x3 from typegpudata.ts | 18.71 kB (➖) |
| sint32x4 from typegpudata.ts | 18.71 kB (➖) |
| sint8 from typegpudata.ts | 18.71 kB (➖) |
| sint8x2 from typegpudata.ts | 18.71 kB (➖) |
| sint8x4 from typegpudata.ts | 18.71 kB (➖) |
| sizeOf from typegpudata.ts | 22.52 kB (➖) |
| size from typegpudata.ts | 24.21 kB (➖) |
| smoothstep from typegpustd.ts | 63.41 kB (➖) |
| snorm16 from typegpudata.ts | 18.71 kB (➖) |
| snorm16x2 from typegpudata.ts | 18.71 kB (➖) |
| snorm16x4 from typegpudata.ts | 18.71 kB (➖) |
| snorm8 from typegpudata.ts | 18.71 kB (➖) |
| snorm8x2 from typegpudata.ts | 18.71 kB (➖) |
| snorm8x4 from typegpudata.ts | 18.71 kB (➖) |
| sqrt from typegpustd.ts | 63.41 kB (➖) |
| std from typegpu.ts | 99.56 kB (➖) |
| step from typegpustd.ts | 63.41 kB (➖) |
| storageBarrier from typegpustd.ts | 13.61 kB (➖) |
| struct from typegpudata.ts | 3.37 kB (➖) |
| sub from typegpustd.ts | 46.10 kB (➖) |
| subgroupAdd from typegpustd.ts | 21.77 kB (➖) |
| subgroupAll from typegpustd.ts | 21.78 kB (➖) |
| subgroupAnd from typegpustd.ts | 21.78 kB (➖) |
| subgroupAny from typegpustd.ts | 21.78 kB (➖) |
| subgroupBallot from typegpustd.ts | 21.78 kB (➖) |
| subgroupBroadcastFirst from typegpustd.ts | 21.78 kB (➖) |
| subgroupBroadcast from typegpustd.ts | 21.78 kB (➖) |
| subgroupElect from typegpustd.ts | 21.78 kB (➖) |
| subgroupExclusiveAdd from typegpustd.ts | 21.78 kB (➖) |
| subgroupExclusiveMul from typegpustd.ts | 21.78 kB (➖) |
| subgroupInclusiveAdd from typegpustd.ts | 21.78 kB (➖) |
| subgroupInclusiveMul from typegpustd.ts | 21.78 kB (➖) |
| subgroupMax from typegpustd.ts | 21.78 kB (➖) |
| subgroupMin from typegpustd.ts | 21.78 kB (➖) |
| subgroupMul from typegpustd.ts | 21.78 kB (➖) |
| subgroupOr from typegpustd.ts | 21.78 kB (➖) |
| subgroupShuffleDown from typegpustd.ts | 21.78 kB (➖) |
| subgroupShuffleUp from typegpustd.ts | 21.78 kB (➖) |
| subgroupShuffleXor from typegpustd.ts | 21.78 kB (➖) |
| subgroupShuffle from typegpustd.ts | 21.78 kB (➖) |
| subgroupXor from typegpustd.ts | 21.78 kB (➖) |
| tan from typegpustd.ts | 63.41 kB (➖) |
| tanh from typegpustd.ts | 63.41 kB (➖) |
| texture1d from typegpudata.ts | 11.25 kB (➖) |
| texture2dArray from typegpudata.ts | 11.27 kB (➖) |
| texture2d from typegpudata.ts | 11.25 kB (➖) |
| texture3d from typegpudata.ts | 11.25 kB (➖) |
| textureBarrier from typegpustd.ts | 13.61 kB (➖) |
| textureCubeArray from typegpudata.ts | 11.27 kB (➖) |
| textureCube from typegpudata.ts | 11.26 kB (➖) |
| textureDepth2dArray from typegpudata.ts | 11.26 kB (➖) |
| textureDepth2d from typegpudata.ts | 11.24 kB (➖) |
| textureDepthCubeArray from typegpudata.ts | 11.26 kB (➖) |
| textureDepthCube from typegpudata.ts | 11.25 kB (➖) |
| textureDepthMultisampled2d from typegpudata.ts | 11.26 kB (➖) |
| textureDimensions from typegpustd.ts | 23.53 kB (➖) |
| textureExternal from typegpudata.ts | 873 B (➖) |
| textureGather from typegpustd.ts | 23.53 kB (➖) |
| textureLoad from typegpustd.ts | 23.54 kB (➖) |
| textureMultisampled2d from typegpudata.ts | 11.28 kB (➖) |
| textureSampleBaseClampToEdge from typegpustd.ts | 23.54 kB (➖) |
| textureSampleBias from typegpustd.ts | 23.54 kB (➖) |
| textureSampleCompareLevel from typegpustd.ts | 23.54 kB (➖) |
| textureSampleCompare from typegpustd.ts | 23.54 kB (➖) |
| textureSampleGrad from typegpustd.ts | 23.54 kB (➖) |
| textureSampleLevel from typegpustd.ts | 23.54 kB (➖) |
| textureSample from typegpustd.ts | 23.54 kB (➖) |
| textureStorage1d from typegpudata.ts | 1.01 kB (➖) |
| textureStorage2dArray from typegpudata.ts | 1.03 kB (➖) |
| textureStorage2d from typegpudata.ts | 1.01 kB (➖) |
| textureStorage3d from typegpudata.ts | 1.01 kB (➖) |
| textureStore from typegpustd.ts | 23.54 kB (➖) |
| translate4 from typegpustd.ts | 46.86 kB (➖) |
| translation4 from typegpustd.ts | 24.73 kB (➖) |
| transpose from typegpustd.ts | 63.41 kB (➖) |
| trunc from typegpustd.ts | 63.41 kB (➖) |
| u16 from typegpudata.ts | 10.82 kB (➖) |
| u32 from typegpudata.ts | 10.80 kB (➖) |
| uint16 from typegpudata.ts | 18.71 kB (➖) |
| uint16x2 from typegpudata.ts | 18.71 kB (➖) |
| uint16x4 from typegpudata.ts | 18.71 kB (➖) |
| uint32 from typegpudata.ts | 18.71 kB (➖) |
| uint32x2 from typegpudata.ts | 18.71 kB (➖) |
| uint32x3 from typegpudata.ts | 18.71 kB (➖) |
| uint32x4 from typegpudata.ts | 18.71 kB (➖) |
| uint8 from typegpudata.ts | 18.70 kB (➖) |
| uint8x2 from typegpudata.ts | 18.71 kB (➖) |
| uint8x4 from typegpudata.ts | 18.71 kB (➖) |
| unorm10 10 10 2 from typegpudata.ts | 18.71 kB (➖) |
| unorm16 from typegpudata.ts | 18.71 kB (➖) |
| unorm16x2 from typegpudata.ts | 18.71 kB (➖) |
| unorm16x4 from typegpudata.ts | 18.71 kB (➖) |
| unorm8 from typegpudata.ts | 18.71 kB (➖) |
| unorm8x2 from typegpudata.ts | 18.71 kB (➖) |
| unorm8x4 bgra from typegpudata.ts | 18.71 kB (➖) |
| unorm8x4 from typegpudata.ts | 18.71 kB (➖) |
| unpack2x16float from typegpustd.ts | 33.74 kB (➖) |
| unpack4x8unorm from typegpustd.ts | 33.74 kB (➖) |
| unstruct from typegpudata.ts | 1.65 kB (➖) |
| vec2b from typegpudata.ts | 17.21 kB (➖) |
| vec2f from typegpudata.ts | 17.21 kB (➖) |
| vec2h from typegpudata.ts | 17.21 kB (➖) |
| vec2i from typegpudata.ts | 17.21 kB (➖) |
| vec2u from typegpudata.ts | 17.21 kB (➖) |
| vec3b from typegpudata.ts | 17.21 kB (➖) |
| vec3f from typegpudata.ts | 17.21 kB (➖) |
| vec3h from typegpudata.ts | 17.21 kB (➖) |
| vec3i from typegpudata.ts | 17.21 kB (➖) |
| vec3u from typegpudata.ts | 17.21 kB (➖) |
| vec4b from typegpudata.ts | 17.21 kB (➖) |
| vec4f from typegpudata.ts | 17.21 kB (➖) |
| vec4h from typegpudata.ts | 17.21 kB (➖) |
| vec4i from typegpudata.ts | 17.21 kB (➖) |
| vec4u from typegpudata.ts | 17.21 kB (➖) |
| workgroupBarrier from typegpustd.ts | 13.61 kB (➖) |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.81, 1.67, 3.77, 5.92, 6.35, 8.27, 19.39, 22.75]
line [0.80, 1.68, 3.72, 5.27, 6.37, 7.98, 18.26, 21.73]
line [0.85, 1.63, 3.54, 5.78, 6.23, 10.34, 18.15, 20.53]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.28, 0.51, 0.63, 0.76, 1.01, 1.09, 1.33, 1.41]
line [0.27, 0.50, 0.67, 0.75, 1.03, 1.10, 1.25, 1.43]
line [0.25, 0.51, 0.66, 0.76, 1.03, 1.06, 1.29, 1.40]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.85, 1.77, 3.27, 5.55, 10.96, 22.79, 50.35, 100.77]
line [0.83, 1.87, 3.86, 6.13, 10.81, 21.76, 48.80, 98.54]
line [0.79, 1.74, 3.40, 5.36, 10.70, 21.94, 49.33, 97.25]
|
There was a problem hiding this comment.
Pull request overview
This PR improves TypeGPU resolution diagnostics by emitting more human-readable, source-shaped code snippets in error messages (instead of resolved WGSL fragments), primarily by stringifying tinyest AST nodes and updating tests accordingly.
Changes:
- Add
stringifyNode()(tinyest AST → JS-like string) and use it throughout the WGSL generator’s error paths. - Update many inline snapshots to match the new, more descriptive error messages.
- Add new tests covering additional “descriptive error” scenarios (plus some temporary snapshot-sanity tests).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/typegpu/src/tgsl/wgslGenerator.ts | Switches multiple error messages to use AST stringification for clearer hints; adds a couple of new validations/messages. |
| packages/typegpu/src/shared/tseynit.ts | New tinyest AST stringifier used to render user-facing code snippets in errors. |
| packages/typegpu/tests/tgsl/wgslGenerator.test.ts | Updates snapshots and adds new tests for improved error messages (too many args, non-uniform arrays, reference-return/assignment, etc.). |
| packages/typegpu/tests/tgslFn.test.ts | Updates snapshot to reflect new “assignment to outer-scope immutable” hint. |
| packages/typegpu/tests/tgsl/typeInference.test.ts | Updates snapshot to include a stringified object literal in the inference error. |
| packages/typegpu/tests/tgsl/ternaryOperator.test.ts | Updates snapshot to include the full ternary expression in the error. |
| packages/typegpu/tests/tgsl/argumentOrigin.test.ts | Updates snapshots to show original argument/prop names in mutation/return errors. |
| packages/typegpu/tests/swizzleMixedValidation.test.ts | Updates snapshots for member-access error wording. |
| packages/typegpu/tests/ref.test.ts | Updates snapshots for ref-related error wording (use original identifier / call text). |
| packages/typegpu/tests/constant.test.ts | Updates snapshot for const-mutation error wording (stringified AST). |
| packages/typegpu/tests/unroll.test.ts | Updates snapshot for unroll error wording (stringified iterable). |
| packages/typegpu/tests/tgsl/tseynit.test.ts | New unit tests for stringifyNode() output across expression/statement forms. |
| packages/typegpu/tests/this-folder-will-be-deleted-before-merge/stringify-edge-cases.test.ts | Temporary sanity-check test file added (per PR description). |
| packages/typegpu/tests/this-folder-will-be-deleted-before-merge/complex-use-gpu.test.ts | Temporary large snapshot test file added (per PR description). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
iwoplaza
left a comment
There was a problem hiding this comment.
Music to my eyes 😭. Beautiful work
!! 1400 lines are sanity ai-generated tests, that I will remove before merge !!
There are some things that we cannot reproduce:
An example of extra parentheses:
becomes