Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #18056: [v3.8.6] Support to mangle private properties. #18087

Merged
merged 7 commits into from
Dec 27, 2024

Conversation

dumganhar
Copy link
Contributor

Re: #18056

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

Copy link

github-actions bot commented Dec 27, 2024

👍 Package size ⤵ -125568 bytes, old: 5441780, new: 5316212

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -23568,9 +23568,10 @@
             REFLECTION_PROBE_DATA2 = 44,
             REFLECTION_PROBE_BLEND_DATA1 = 48,
             REFLECTION_PROBE_BLEND_DATA2 = 52,
             COUNT = 56,
-            SIZE = 224
+            SIZE = 224,
+            BINDING = 0
         }
         /**
          * @en The local uniform buffer object
          * @zh 本地 UBO。
@@ -23586,9 +23587,9 @@
             static readonly REFLECTION_PROBE_BLEND_DATA2: UBOLocalEnum;
             static readonly COUNT: UBOLocalEnum;
             static readonly SIZE: UBOLocalEnum;
             static readonly NAME = "CCLocal";
-            static readonly BINDING = ModelLocalBindings.UBO_LOCAL;
+            static readonly BINDING: UBOLocalEnum;
             static readonly DESCRIPTOR: gfx.DescriptorSetLayoutBinding;
             static readonly LAYOUT: gfx.UniformBlock;
         }
         /**
@@ -23725,9 +23726,10 @@
             SH_QUADRATIC_G_OFFSET = 16,
             SH_QUADRATIC_B_OFFSET = 20,
             SH_QUADRATIC_A_OFFSET = 24,
             COUNT = 28,
-            SIZE = 112
+            SIZE = 112,
+            BINDING = 6
         }
         /**
          * @en The SH uniform buffer object
          * @zh 球谐 UBO。
@@ -23742,9 +23744,9 @@
             static readonly SH_QUADRATIC_A_OFFSET: UBOSHEnum;
             static readonly COUNT: UBOSHEnum;
             static readonly SIZE: UBOSHEnum;
             static readonly NAME = "CCSH";
-            static readonly BINDING = ModelLocalBindings.UBO_SH;
+            static readonly BINDING: UBOSHEnum;
             static readonly DESCRIPTOR: gfx.DescriptorSetLayoutBinding;
             static readonly LAYOUT: gfx.UniformBlock;
         }
         export const UNIFORM_JOINT_TEXTURE_BINDING = ModelLocalBindings.SAMPLER_JOINTS;
@@ -25707,8 +25709,9 @@
          * 此方法将在第一次实例化预制件之前自动调用,<br/>
          * 但是您可以在脚本中修改原始预制数据后重新调用以刷新创建功能。
          */
         compileCreateFunction(): void;
+        protected _instantiate(): Node;
         initDefault(uuid?: string): void;
         validate(): boolean;
         onLoaded(): void;
     }
@@ -66431,8 +66434,9 @@
         }
         export interface _cocos_gfx_webgl_webgl_state_cache__IWebGLTexUnit {
             glTexture: WebGLTexture | null;
         }
+        /** @mangle */
         export class _cocos_gfx_webgl_webgl_state_cache__WebGLStateCache {
             glArrayBuffer: WebGLBuffer | null;
             glElementArrayBuffer: WebGLBuffer | null;
             glVAO: WebGLVertexArrayObjectOES | null;

@dumganhar dumganhar marked this pull request as draft December 27, 2024 05:40
@dumganhar dumganhar requested a review from minggo December 27, 2024 08:29
@dumganhar dumganhar marked this pull request as ready for review December 27, 2024 08:29
type: binding.descriptorType,
gpuBuffer: null,
gpuTexture: null,
gpuSampler: null,
});
};
gpuDescriptors.push(gpuDescriptor);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has to be done to make mangle work, since mangling properties needs to know the type of interface.
It's difficult to get the type of {...} without define it explicitly because it just a pure __object type.

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

@dumganhar, Please check the result of run test cases:

Task Details

Copy link

@dumganhar, Please check the result of run test cases:

Task Details

@dumganhar dumganhar merged commit 70d53ac into cocos:v3.8.6 Dec 27, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants