moonbitlang / moon

The build system and package manager for MoonBit
https://moonbitlang.github.io/moon/
GNU Affero General Public License v3.0
188 stars 17 forks source link

add -no-dts option when gen cjs driver #457

Closed hackwaly closed 2 weeks ago

hackwaly commented 2 weeks ago

Related Issues

Type of Pull Request

Does this PR change existing behavior?

Does this PR introduce new dependencies?

Checklist:

peter-jerry-ye-code-review[bot] commented 2 weeks ago

The provided git diff output indicates changes in several files related to the build and test processes for the MoonBit programming language. Here are three potential issues or suggestions based on the changes observed:

  1. Removal of -no-dts Flag in JS Targets:

    • The addition of -no-dts flag in the moonc link-core commands for JavaScript targets suggests that TypeScript definition files (DTS) are no longer being generated for these builds. This change might affect developers who rely on TypeScript definitions for integration or development purposes.
    • Suggestion: Ensure that this change is intentional and communicate it clearly to the development team. If TypeScript definitions are still needed for some use cases, consider implementing a conditional flag or providing an alternative way to generate them.
  2. Consistency in Test Driver Generation:

    • The diff shows changes in the generation of test drivers for different targets and driver kinds (e.g., internal, blackbox). Ensuring consistency in how test drivers are generated and linked across different targets (JS, WASM) and configurations (debug, release) is crucial for maintaining a reliable testing framework.
    • Suggestion: Review the test driver generation and linking processes to ensure they are consistent and optimized for all target configurations. This includes verifying that the correct flags and options are used to produce expected outputs.
  3. Documentation and Communication:

    • The changes in the build commands, especially the addition of -no-dts, suggest a modification in the build process. Clear documentation and communication about such changes are essential to avoid confusion or disruptions in development workflows.
    • Suggestion: Update the project's documentation to reflect these changes, including any new flags or options introduced. Additionally, consider communicating these changes through project update meetings or release notes to ensure all team members are aware of the updates.

These observations and suggestions aim to ensure that the changes in the build and test processes align with the project's goals and do not inadvertently introduce issues or incompatibilities.