From 8d6e6ff7018d106bca9f862437a28e01d23b8692 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Mon, 10 Jun 2024 10:40:32 -0400 Subject: [PATCH 1/4] Replace uses of with We're choosing one name for the class and it will be . --- .../compiler/notes-warnings-errors.rst | 2 +- .../common-dylan/common-extensions.rst | 40 +++++++------------ .../library-reference/system/locators.rst | 6 +-- sources/common-dylan/format.dylan | 2 +- sources/common-dylan/streams-protocol.dylan | 4 +- sources/dfmc/conditions/hierarchy.dylan | 2 +- sources/dfmc/conditions/report.dylan | 4 +- sources/dylan/condition-extras.dylan | 2 +- sources/dylan/condition.dylan | 1 + sources/dylan/number.dylan | 2 +- .../environment/commands/command-line.dylan | 2 +- sources/environment/commands/properties.dylan | 2 +- .../dfmc/application/breakpoint-objects.dylan | 2 +- .../protocols/condition-objects.dylan | 6 +-- .../environment/tools/project-commands.dylan | 2 +- sources/lib/dood/native-macros.dylan | 2 +- sources/system/locators/locators.dylan | 2 +- sources/system/tests/specification.dylan | 2 +- 18 files changed, 37 insertions(+), 48 deletions(-) diff --git a/documentation/source/hacker-guide/compiler/notes-warnings-errors.rst b/documentation/source/hacker-guide/compiler/notes-warnings-errors.rst index 2c5edcffc5..5d6bc22fd4 100644 --- a/documentation/source/hacker-guide/compiler/notes-warnings-errors.rst +++ b/documentation/source/hacker-guide/compiler/notes-warnings-errors.rst @@ -341,7 +341,7 @@ Program Conditions :open: :abstract: - :superclasses: :const:`` + :superclasses: :class:`` :keyword compilation-stage: Defaults to the value of :var:`*current-stage*`. :keyword program-note-creator: Defaults to the value of :var:`*current-dependent*`. diff --git a/documentation/source/library-reference/common-dylan/common-extensions.rst b/documentation/source/library-reference/common-dylan/common-extensions.rst index 7bb3fffe67..10aa08a2eb 100644 --- a/documentation/source/library-reference/common-dylan/common-extensions.rst +++ b/documentation/source/library-reference/common-dylan/common-extensions.rst @@ -15,8 +15,7 @@ The extensions are: - Collection model: :class:``, :class:``, :gf:`difference`, :func:`fill-table!`, :gf:`find-element`, :gf:`position`, :gf:`remove-all-keys!`, :macro:`define table`, :gf:`split`, and :gf:`join`. -- Condition system: :class:``, - :class:``, and :gf:`condition-to-string`. +- Condition system: :class:``, and :gf:`condition-to-string`. - Control flow: :macro:`iterate` and :macro:`when`. - Development conveniences: @@ -143,7 +142,7 @@ The extensions are: Returns a string representation of a general instance of :drm:``. There is a method on - :class:`` and method on + :class:`` and method on :drm:``. .. macro:: debug-assert @@ -522,25 +521,6 @@ The extensions are: Formats a floating-point number to a string. It uses scientific notation where necessary. -.. class:: - :sealed: - :instantiable: - - The class of conditions that take a format string. - - :superclasses: :drm:`` - - :description: - - The class of conditions that take a format string, as defined by - the DRM. - - It is the superclass of Dylan's :class:``. - - :seealso: - - - The :doc:`Format module <../io/format>` in the :doc:`IO library <../io/index>`. - .. function:: ignore A compiler directive that tells the compiler it must not issue a @@ -777,20 +757,28 @@ The extensions are: :sealed: :instantiable: - The class of simple conditions. + The class of conditions that accept a format string and format arguments + with which to build a message describing the condition. - :superclasses: :class:`` + :superclasses: :class:`` :description: - The class of simple conditions. It is the superclass of :drm:``, - :drm:``, and :drm:``. + As the superclass of :drm:``, :drm:``, and + :drm:``, the :class:`` class provides + the ``format-string:`` and ``format-arguments:`` init keywords described + in the DRM. :operations: - :drm:`condition-format-string` - :drm:`condition-format-arguments` + :seealso: + + - The :doc:`format module <../io/format>` in the :doc:`IO library + <../io/index>`. + .. class:: :open: :abstract: diff --git a/documentation/source/library-reference/system/locators.rst b/documentation/source/library-reference/system/locators.rst index fed58888d0..890f0a02b5 100644 --- a/documentation/source/library-reference/system/locators.rst +++ b/documentation/source/library-reference/system/locators.rst @@ -85,8 +85,8 @@ The locators Module All errors raised by the locator system should be instances of this error. - - :superclasses: :class:``, :drm:`` + + :superclasses: :class:``, :drm:`` .. class:: @@ -94,7 +94,7 @@ The locators Module :abstract: The abstract superclass of locators for servers. - + :superclasses: :class:`` :seealso: diff --git a/sources/common-dylan/format.dylan b/sources/common-dylan/format.dylan index 6860ddcfac..36ee6c9710 100644 --- a/sources/common-dylan/format.dylan +++ b/sources/common-dylan/format.dylan @@ -582,7 +582,7 @@ define method condition-to-string end method condition-to-string; define method condition-to-string - (condition :: ) => (string :: ) + (condition :: ) => (string :: ) apply(format-to-string, condition-format-string(condition), condition-format-arguments(condition)) diff --git a/sources/common-dylan/streams-protocol.dylan b/sources/common-dylan/streams-protocol.dylan index cb3bdaab57..e92eb5b98b 100644 --- a/sources/common-dylan/streams-protocol.dylan +++ b/sources/common-dylan/streams-protocol.dylan @@ -5,7 +5,7 @@ Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND -define open abstract class (, ) +define open abstract class () constant slot stream-error-stream :: , required-init-keyword: stream:; end; @@ -17,7 +17,7 @@ define generic stream-error-stream // TODO: yuck. Would be nicer to just have a condition-to-string method.. // andrewa: note that then you need to update the runtime manager to // know about the new class too, it is simpler to rely on subclassing -// . +// . define method make (class :: subclass(), #rest args, diff --git a/sources/dfmc/conditions/hierarchy.dylan b/sources/dfmc/conditions/hierarchy.dylan index 31072525af..3aec042326 100644 --- a/sources/dfmc/conditions/hierarchy.dylan +++ b/sources/dfmc/conditions/hierarchy.dylan @@ -41,7 +41,7 @@ define function invoke-debugger (condition) end; // best to subclass one of , , or // instead. -define open abstract class () +define open abstract class () // TODO: Make this class primary. diff --git a/sources/dfmc/conditions/report.dylan b/sources/dfmc/conditions/report.dylan index 37c26138bd..62a43e65ab 100644 --- a/sources/dfmc/conditions/report.dylan +++ b/sources/dfmc/conditions/report.dylan @@ -23,8 +23,8 @@ define thread variable *detail-level* :: = #"normal"; // specializable parameter. // // The default method for s takes advantage of the -// fact that all program conditions obey the -// (aka ) protocol of having a format string and its +// fact that all program conditions obey the +// protocol of having a format string and its // arguments in the condition itself. Methods for conditions outside // the program condition hierarchy just handle the default level by // using the %s/%= distinction in format. diff --git a/sources/dylan/condition-extras.dylan b/sources/dylan/condition-extras.dylan index 5d9e09fb86..7a489877e2 100644 --- a/sources/dylan/condition-extras.dylan +++ b/sources/dylan/condition-extras.dylan @@ -89,7 +89,7 @@ end method abort; /// TYPE-ERRORS -define open class (, ) // Should be sealed? +define open class (, ) // Should be sealed? constant slot type-error-value, init-keyword: value:; constant slot type-error-expected-type :: , init-keyword: type:; end class ; diff --git a/sources/dylan/condition.dylan b/sources/dylan/condition.dylan index 1bcd7860b6..587c4dd310 100644 --- a/sources/dylan/condition.dylan +++ b/sources/dylan/condition.dylan @@ -62,6 +62,7 @@ define open abstract primary class () constant slot condition-format-arguments, init-keyword: format-arguments:, init-value: #[]; end class ; +// Deprecated. Use instead. This will be removed in a future release. define constant = ; // debug-message and its C primitive require the arguments as a vector. diff --git a/sources/dylan/number.dylan b/sources/dylan/number.dylan index e5958cb377..10a17be0fa 100644 --- a/sources/dylan/number.dylan +++ b/sources/dylan/number.dylan @@ -100,7 +100,7 @@ define generic remainder //// CONDITIONS -define open abstract class (, ) +define open abstract class (, ) inherited slot condition-format-string = "Arithmetic error"; end class ; diff --git a/sources/environment/commands/command-line.dylan b/sources/environment/commands/command-line.dylan index 64615b88c0..d1cf2196ed 100644 --- a/sources/environment/commands/command-line.dylan +++ b/sources/environment/commands/command-line.dylan @@ -260,7 +260,7 @@ define open generic parse-next-argument /// Utilities -define class (, ) +define class (, ) end class ; define class () diff --git a/sources/environment/commands/properties.dylan b/sources/environment/commands/properties.dylan index 42b97e5281..d05afb5f00 100644 --- a/sources/environment/commands/properties.dylan +++ b/sources/environment/commands/properties.dylan @@ -137,7 +137,7 @@ end method show-property; /// Errors -define class (, ) +define class (, ) end class ; define method set-error diff --git a/sources/environment/dfmc/application/breakpoint-objects.dylan b/sources/environment/dfmc/application/breakpoint-objects.dylan index cef7b5041d..4796d64f39 100644 --- a/sources/environment/dfmc/application/breakpoint-objects.dylan +++ b/sources/environment/dfmc/application/breakpoint-objects.dylan @@ -65,7 +65,7 @@ end class ; ///// // The class of all breakpoint errors -define abstract class (, ) +define abstract class (, ) end class ; diff --git a/sources/environment/protocols/condition-objects.dylan b/sources/environment/protocols/condition-objects.dylan index a125b2fa47..40e57e977b 100644 --- a/sources/environment/protocols/condition-objects.dylan +++ b/sources/environment/protocols/condition-objects.dylan @@ -12,9 +12,9 @@ define user-object-class () binding , module: dylan, library: dylan; end user-object-class ; -define user-object-class () - binding , module: dylan-extensions, library: dylan; -end user-object-class ; +define user-object-class () + binding , module: dylan-extensions, library: dylan; +end user-object-class ; define constant $format-condition-string-id = make(, diff --git a/sources/environment/tools/project-commands.dylan b/sources/environment/tools/project-commands.dylan index 783e5a168b..860b15bf6f 100644 --- a/sources/environment/tools/project-commands.dylan +++ b/sources/environment/tools/project-commands.dylan @@ -526,7 +526,7 @@ end method environment-open-file; /// Project error handling -define class (, ) +define class (, ) end class ; define class () diff --git a/sources/lib/dood/native-macros.dylan b/sources/lib/dood/native-macros.dylan index 7c21252d6a..6eda13c4c7 100644 --- a/sources/lib/dood/native-macros.dylan +++ b/sources/lib/dood/native-macros.dylan @@ -4,7 +4,7 @@ Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND -define class (, ) +define class (, ) end class; /* diff --git a/sources/system/locators/locators.dylan b/sources/system/locators/locators.dylan index c34171a4bf..adf08c0f5b 100644 --- a/sources/system/locators/locators.dylan +++ b/sources/system/locators/locators.dylan @@ -113,7 +113,7 @@ end method as; /// Locator conditions -define class (, ) +define class (, ) end class ; define function locator-error diff --git a/sources/system/tests/specification.dylan b/sources/system/tests/specification.dylan index b1956b035f..bfecf65875 100644 --- a/sources/system/tests/specification.dylan +++ b/sources/system/tests/specification.dylan @@ -73,7 +73,7 @@ define interface-specification-suite file-system-locators-specification-suite () (subclass(), ) => (); // Locator conditions - instantiable class (, ); + instantiable class (, ); function locator-error (, #"rest") => (#"rest"); // Utilities From b02008686b28b7ce6e37577f24d00982f485d0c2 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Mon, 10 Jun 2024 10:58:13 -0400 Subject: [PATCH 2/4] Use and where appropriate Replaces superclass lists like (, ) with just (), and similarly for warnings. --- documentation/source/library-reference/system/locators.rst | 2 +- sources/common-dylan/streams-protocol.dylan | 2 +- sources/dylan/condition-extras.dylan | 2 +- sources/environment/commands/command-line.dylan | 2 +- sources/environment/commands/properties.dylan | 2 +- sources/environment/tools/project-commands.dylan | 2 +- sources/lib/dood/native-macros.dylan | 2 +- sources/project-manager/user-projects/interactive-project.dylan | 2 +- sources/system/file-system/file-system.dylan | 2 +- sources/system/locators/locators.dylan | 2 +- sources/system/tests/specification.dylan | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/documentation/source/library-reference/system/locators.rst b/documentation/source/library-reference/system/locators.rst index 890f0a02b5..8a77d73f35 100644 --- a/documentation/source/library-reference/system/locators.rst +++ b/documentation/source/library-reference/system/locators.rst @@ -86,7 +86,7 @@ The locators Module All errors raised by the locator system should be instances of this error. - :superclasses: :class:``, :drm:`` + :superclasses: :drm:`` .. class:: diff --git a/sources/common-dylan/streams-protocol.dylan b/sources/common-dylan/streams-protocol.dylan index e92eb5b98b..8af73b0200 100644 --- a/sources/common-dylan/streams-protocol.dylan +++ b/sources/common-dylan/streams-protocol.dylan @@ -5,7 +5,7 @@ Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND -define open abstract class () +define open abstract class (, ) constant slot stream-error-stream :: , required-init-keyword: stream:; end; diff --git a/sources/dylan/condition-extras.dylan b/sources/dylan/condition-extras.dylan index 7a489877e2..c2656c54a4 100644 --- a/sources/dylan/condition-extras.dylan +++ b/sources/dylan/condition-extras.dylan @@ -89,7 +89,7 @@ end method abort; /// TYPE-ERRORS -define open class (, ) // Should be sealed? +define open class () // Should be sealed? constant slot type-error-value, init-keyword: value:; constant slot type-error-expected-type :: , init-keyword: type:; end class ; diff --git a/sources/environment/commands/command-line.dylan b/sources/environment/commands/command-line.dylan index d1cf2196ed..a3f80a8d4a 100644 --- a/sources/environment/commands/command-line.dylan +++ b/sources/environment/commands/command-line.dylan @@ -260,7 +260,7 @@ define open generic parse-next-argument /// Utilities -define class (, ) +define class () end class ; define class () diff --git a/sources/environment/commands/properties.dylan b/sources/environment/commands/properties.dylan index d05afb5f00..0fba3cfd9b 100644 --- a/sources/environment/commands/properties.dylan +++ b/sources/environment/commands/properties.dylan @@ -137,7 +137,7 @@ end method show-property; /// Errors -define class (, ) +define class () end class ; define method set-error diff --git a/sources/environment/tools/project-commands.dylan b/sources/environment/tools/project-commands.dylan index 860b15bf6f..2b0d5788af 100644 --- a/sources/environment/tools/project-commands.dylan +++ b/sources/environment/tools/project-commands.dylan @@ -526,7 +526,7 @@ end method environment-open-file; /// Project error handling -define class (, ) +define class () end class ; define class () diff --git a/sources/lib/dood/native-macros.dylan b/sources/lib/dood/native-macros.dylan index 6eda13c4c7..24f2261a49 100644 --- a/sources/lib/dood/native-macros.dylan +++ b/sources/lib/dood/native-macros.dylan @@ -4,7 +4,7 @@ Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND -define class (, ) +define class () end class; /* diff --git a/sources/project-manager/user-projects/interactive-project.dylan b/sources/project-manager/user-projects/interactive-project.dylan index 97cb4388eb..ab9cb7eb5a 100644 --- a/sources/project-manager/user-projects/interactive-project.dylan +++ b/sources/project-manager/user-projects/interactive-project.dylan @@ -101,7 +101,7 @@ define method project-close-compilation-contexts next-method() end; -define class (, ) end; +define class () end; define function verify-execution-target (project :: ) diff --git a/sources/system/file-system/file-system.dylan b/sources/system/file-system/file-system.dylan index fa5aa63b60..ffbdc20c5a 100644 --- a/sources/system/file-system/file-system.dylan +++ b/sources/system/file-system/file-system.dylan @@ -22,7 +22,7 @@ end class ; define class (, ) end class ; -define sealed class (, ) +define sealed class () end class ; define sealed class () diff --git a/sources/system/locators/locators.dylan b/sources/system/locators/locators.dylan index adf08c0f5b..93c13a04e3 100644 --- a/sources/system/locators/locators.dylan +++ b/sources/system/locators/locators.dylan @@ -113,7 +113,7 @@ end method as; /// Locator conditions -define class (, ) +define class () end class ; define function locator-error diff --git a/sources/system/tests/specification.dylan b/sources/system/tests/specification.dylan index bfecf65875..85b4366c74 100644 --- a/sources/system/tests/specification.dylan +++ b/sources/system/tests/specification.dylan @@ -73,7 +73,7 @@ define interface-specification-suite file-system-locators-specification-suite () (subclass(), ) => (); // Locator conditions - instantiable class (, ); + instantiable class (); function locator-error (, #"rest") => (#"rest"); // Utilities From 166c4978edb6de66ef0863735e1a7d1437ee621a Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Mon, 10 Jun 2024 11:00:07 -0400 Subject: [PATCH 3/4] Deprecate Use instead. There's no point having two names for one class. --- sources/common-dylan/library.dylan | 4 ++-- sources/dfmc/modeling/namespaces.dylan | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/common-dylan/library.dylan b/sources/common-dylan/library.dylan index 78bb4c7d10..a78ac4dca1 100644 --- a/sources/common-dylan/library.dylan +++ b/sources/common-dylan/library.dylan @@ -66,7 +66,8 @@ end module byte-vector; define module common-extensions use dylan-extensions, export: { , - , + , // Deprecated... + , // ...use this instead. , , , @@ -75,7 +76,6 @@ define module common-extensions , , , - , , , false-or, diff --git a/sources/dfmc/modeling/namespaces.dylan b/sources/dfmc/modeling/namespaces.dylan index fac8b9f9a2..15377adfdc 100644 --- a/sources/dfmc/modeling/namespaces.dylan +++ b/sources/dfmc/modeling/namespaces.dylan @@ -719,8 +719,8 @@ define &module dylan-extensions create \last-handler-definer, - , - , // HACK: COMPATIBILITY + , // Deprecated... + , // ...use this instead. , , , From 08bbd1d9da6a31d74191c611b32531ab0bcd2ba5 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Mon, 10 Jun 2024 11:01:20 -0400 Subject: [PATCH 4/4] doc: minor changes related to --- .../source/getting-started-cli/debugging-with-gdb-lldb.rst | 6 +++--- documentation/source/library-reference/io/print.rst | 2 +- documentation/source/library-reference/network/index.rst | 2 +- .../source/library-reference/system/file-system.rst | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/documentation/source/getting-started-cli/debugging-with-gdb-lldb.rst b/documentation/source/getting-started-cli/debugging-with-gdb-lldb.rst index 53760b2827..c028e0b00e 100644 --- a/documentation/source/getting-started-cli/debugging-with-gdb-lldb.rst +++ b/documentation/source/getting-started-cli/debugging-with-gdb-lldb.rst @@ -361,16 +361,16 @@ and will assist you in analyzing values. .. c:function:: bool dylan_simple_condition_p (D instance) - Tests whether instance is a ````. + Tests whether instance is a :class:``. .. c:function:: D dylan_simple_condition_format_string (D instance) - Returns the format string stored in the given ````. + Returns the format string stored in the given :class:``. .. c:function:: D dylan_simple_condition_format_args (D instance) Returns the format string arguments stored in the given - ````. + :class:``. .. c:function:: bool dylan_class_p (D instance) diff --git a/documentation/source/library-reference/io/print.rst b/documentation/source/library-reference/io/print.rst index 13238a888f..99baac3f76 100644 --- a/documentation/source/library-reference/io/print.rst +++ b/documentation/source/library-reference/io/print.rst @@ -349,7 +349,7 @@ IO library's *print* module. end; With the above method, an ```` object with name "foo" will print as - ``{ "foo" #xDEADBEEF}``. + ``{ "foo" 123}`` where ``123`` is a unique identifier for the object. The pprint Module diff --git a/documentation/source/library-reference/network/index.rst b/documentation/source/library-reference/network/index.rst index 9010201d88..226698d4ce 100644 --- a/documentation/source/library-reference/network/index.rst +++ b/documentation/source/library-reference/network/index.rst @@ -731,7 +731,7 @@ This section lists the socket condition classes in the Network library. :description: The class of socket conditions. It inherits the ``format-string:`` - and ``format-arguments:`` keywords from + and ``format-arguments:`` init keywords from :class:``. Slots: diff --git a/documentation/source/library-reference/system/file-system.rst b/documentation/source/library-reference/system/file-system.rst index 4c2245662d..3b5d9efab6 100644 --- a/documentation/source/library-reference/system/file-system.rst +++ b/documentation/source/library-reference/system/file-system.rst @@ -797,10 +797,10 @@ File-System module. .. class:: - Error type signaled when any other functions in the File-System + Error type signaled when any of the functions in the File-System module signal an error. - :superclasses: :drm:``, :class:`` + :superclasses: :drm:`` :description: