Skip to content

Conversation

@RobertvanderHulst
Copy link
Member

Merge changes from dev to main

RobertvanderHulst and others added 9 commits December 31, 2025 14:27
… substraction with numbers that do not fit into a 32 bit integer. See #1764
…ues to overflow into an Int64 value.

The Usual constructor for type Int64 now returns a Int32 when the value lies between Int32.MinValue and Int32.MaxValue
…r returns an Int32 value when possible and to handle additions on Enums correctly. Restored the constructor for USUAL(INT64) to its original state.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR merges changes from the dev branch to main, introducing support for global usings in XSharp projects and fixing arithmetic overflow issues in the runtime.

Key Changes:

  • Adds a new Global Usings property page for managing implicit namespace imports
  • Fixes integer overflow handling by returning Int64 for Int32 arithmetic operations
  • Changes WinBool internal storage from BYTE to INT for better compatibility
  • Removes legacy Microsoft .xaml configuration files that are no longer needed

Reviewed changes

Copilot reviewed 76 out of 80 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/VisualStudio/XSharpCodeModelXs/Settings/Strings.prg Adds string constants for new Global Usings property page
src/VisualStudio/ProjectPackage/XSharpShellEvents.cs Adds event handler to restore TargetFrameworks on project close
src/VisualStudio/ProjectPackage/Nodes/XSharpSdkProjectNode.cs Adds BuildProject.Save() calls after property modifications
src/VisualStudio/ProjectPackage/Nodes/XSharpProjectNode.cs Registers new Global Usings property page and removes trailing whitespace
src/VisualStudio/AppDesigner/XSharp.AppDesigner2022.pkgdef Registers COM components for property pages
src/VisualStudio/AppDesigner/PropertyPages/XGlobalUsingsPropertyPage*.cs Implements new Global Usings property page UI and logic
src/Runtime/XSharp.RT/Types/WinBool.prg Changes internal storage from BYTE to INT
src/Runtime/XSharp.RT/Types/Usual.prg Adds overflow detection for Int32 addition/subtraction
src/Runtime/MacroCompiler/Compiler/MacroCodeblock.cs Converts Int64 results back to Int32 when in range
src/Runtime/MacroCompiler/Binder/Operator.Binary.cs Updates operator resolution for Int32*Int32 to return Int64
src/Compiler/src/Compiler/XSharpBuildTask/XSharp.props Adds implicit global using declarations
src/Compiler/src/Compiler/XSharpBuildTask/XSharp.GenerateGlobalUsings.targets New MSBuild target for generating global usings
src/Compiler/src/Compiler/XSharpBuildTask/Utilities.cs Refactors boolean conversion utilities into Extensions class
src/CompilerTests/Applications/C950/Prg/C950.prg Test case for integer multiplication overflow fix
Microsoft .xaml files Removes numerous legacy Microsoft configuration files
Files not reviewed (2)
  • src/VisualStudio/AppDesigner/PropertyPages/XGeneralPropertyPagePanel.Designer.cs: Language not supported
  • src/VisualStudio/AppDesigner/PropertyPages/XGlobalUsingsPropertyPagePanel.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RobertvanderHulst RobertvanderHulst merged commit d98b8f1 into main Jan 5, 2026
1 check 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