From 58c4868c356366b1ad8a6db770f1dd6d418cd9bb Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Tue, 23 Apr 2024 10:32:49 +0200 Subject: [PATCH 1/9] adapt CI --- .github/workflows/tests-all.yml | 6 +++--- .github/workflows/tests.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-all.yml b/.github/workflows/tests-all.yml index a7346bed..283cd0d5 100644 --- a/.github/workflows/tests-all.yml +++ b/.github/workflows/tests-all.yml @@ -6,9 +6,9 @@ env: on: push: - branches: [ Pharo12 ] + branches: [ Pharo13 ] pull_request: - branches: [ Pharo12 ] + branches: [ Pharo13 ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - smalltalk: [ Pharo64-12 ] + smalltalk: [ Pharo64-13 ] runs-on: ${{ matrix.os }} name: ${{ matrix.smalltalk }} on ${{ matrix.os }} steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 36743be6..8edf3c83 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - uses: hpi-swa/setup-smalltalkCI@v1 id: smalltalkci with: - smalltalk-image: Pharo64-12 + smalltalk-image: Pharo64-13 - run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} shell: bash timeout-minutes: 15 From a88feb75e402dd2516cf040eff7c1007fb55b830 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 16 May 2024 13:25:58 +0200 Subject: [PATCH 2/9] fix pharo version --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8edf3c83..a14b2a3a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - uses: hpi-swa/setup-smalltalkCI@v1 id: smalltalkci with: - smalltalk-image: Pharo64-13 + smalltalk-image: Pharo64-alpha - run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} shell: bash timeout-minutes: 15 From da2c979682065beaadc1170821e237196445bf7d Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 16 May 2024 13:26:15 +0200 Subject: [PATCH 3/9] fix pharo version --- .github/workflows/tests-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-all.yml b/.github/workflows/tests-all.yml index 283cd0d5..a4f3a718 100644 --- a/.github/workflows/tests-all.yml +++ b/.github/workflows/tests-all.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - smalltalk: [ Pharo64-13 ] + smalltalk: [ Pharo64-alpha ] runs-on: ${{ matrix.os }} name: ${{ matrix.smalltalk }} on ${{ matrix.os }} steps: From 3ac99bb0ce1383e72529bb4802e66e51521529b6 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Fri, 17 May 2024 16:13:35 +0200 Subject: [PATCH 4/9] Fix deprecated call --- src/Microdown-RichTextComposer/MicSemanticAction.class.st | 2 +- src/Microdown-RichTextComposer/MicrodownParser.extension.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microdown-RichTextComposer/MicSemanticAction.class.st b/src/Microdown-RichTextComposer/MicSemanticAction.class.st index 63237749..8db6e33d 100644 --- a/src/Microdown-RichTextComposer/MicSemanticAction.class.st +++ b/src/Microdown-RichTextComposer/MicSemanticAction.class.st @@ -134,7 +134,7 @@ MicSemanticAction >> getMetaClassOrNil [ { #category : 'instance creation' } MicSemanticAction >> getPackageOrNil [ - entity := RPackageOrganizer default packageNamed: tokens first asString ifAbsent: [ nil ]. + entity := self class packageOrganizer packageNamed: tokens first asString ifAbsent: [ nil ]. ^ entity ] diff --git a/src/Microdown-RichTextComposer/MicrodownParser.extension.st b/src/Microdown-RichTextComposer/MicrodownParser.extension.st index 40f674c8..ca23a5a9 100644 --- a/src/Microdown-RichTextComposer/MicrodownParser.extension.st +++ b/src/Microdown-RichTextComposer/MicrodownParser.extension.st @@ -1,6 +1,6 @@ Extension { #name : 'MicrodownParser' } { #category : '*Microdown-RichTextComposer' } -MicrodownParser classSide >> convertToRichText: aString [ +MicrodownParser class >> convertToRichText: aString [ ^ MicRichTextComposer new visit: (self new parse: aString) ] From 434dfc69901668b99e656fab83dc16dfa8cace4f Mon Sep 17 00:00:00 2001 From: Torsten Bergmann Date: Tue, 28 May 2024 14:28:58 +0200 Subject: [PATCH 5/9] Use isNotNil instead of notNil Fix #676 --- .../MicHTMLDocumentTest.class.st | 2 +- src/Microdown-HTMLExporter/MicHTMLStyler.class.st | 8 ++++---- src/Microdown-HTMLExporter/Microdown.extension.st | 6 +++--- src/Microdown-RichTextComposer/MicRichTextCanvas.class.st | 2 +- src/Microdown-Tests/MicFileResourceReferenceTest.class.st | 2 +- src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st | 2 +- src/Microdown-Tests/MicResourceSettingsTest.class.st | 2 +- src/Microdown/MicAbstractBlock.class.st | 2 +- src/Microdown/MicArgumentList.class.st | 2 +- src/Microdown/MicFigureBlock.class.st | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st b/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st index 4629ea60..453a9031 100644 --- a/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st +++ b/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st @@ -96,7 +96,7 @@ MicHTMLDocumentTest >> testCharSet [ description: 'It tests that the charSet identifier is a String'. self - assert: doc charSet notNil + assert: doc charSet isNotNil description: 'It test that the document charset has beed initialized'. diff --git a/src/Microdown-HTMLExporter/MicHTMLStyler.class.st b/src/Microdown-HTMLExporter/MicHTMLStyler.class.st index 191ee3bb..81c61570 100644 --- a/src/Microdown-HTMLExporter/MicHTMLStyler.class.st +++ b/src/Microdown-HTMLExporter/MicHTMLStyler.class.st @@ -129,28 +129,28 @@ MicHTMLStyler >> frameworks [ { #category : 'testing' } MicHTMLStyler >> hasCssSelection [ - ^ self cssListPresenter notNil and: [ self cssListPresenter selection isEmpty not ] + ^ self cssListPresenter isNotNil and: [ self cssListPresenter selection isNotEmpty ] ] { #category : 'testing' } MicHTMLStyler >> hasMicDocument [ "Answer if the receiver has a Microdown HTML document opened" - ^ micHtmlDocument notNil + ^ micHtmlDocument isNotNil ] { #category : 'testing' } MicHTMLStyler >> hasMicDocumentFileRef [ "Answer if the receiver has a Microdown documennt supplied by the user" - ^ micDocumentFileRef notNil + ^ micDocumentFileRef isNotNil ] { #category : 'testing' } MicHTMLStyler >> hasMicDocumentString [ "Answer if the receiver has a Microdown documennt supplied by the user" - ^ micDocumentString notNil + ^ micDocumentString isNotNil ] { #category : 'testing' } diff --git a/src/Microdown-HTMLExporter/Microdown.extension.st b/src/Microdown-HTMLExporter/Microdown.extension.st index cf78d7cf..61b11af1 100644 --- a/src/Microdown-HTMLExporter/Microdown.extension.st +++ b/src/Microdown-HTMLExporter/Microdown.extension.st @@ -1,7 +1,7 @@ Extension { #name : 'Microdown' } { #category : '*Microdown-HTMLExporter' } -Microdown classSide >> asHTMLDocument: aStringOrDoc [ +Microdown class >> asHTMLDocument: aStringOrDoc [ "Facade method to serialize a Microdown document or string to HTML" ^ MicHTMLVisitor serializeToHTMLDoc: aStringOrDoc. @@ -10,7 +10,7 @@ Microdown classSide >> asHTMLDocument: aStringOrDoc [ ] { #category : '*Microdown-HTMLExporter' } -Microdown classSide >> asHTMLString: aStringOrDoc [ +Microdown class >> asHTMLString: aStringOrDoc [ "Facade method to render a microdown document or string to HTML" ^ MicHTMLVisitor asHTMLString: aStringOrDoc. @@ -19,7 +19,7 @@ Microdown classSide >> asHTMLString: aStringOrDoc [ ] { #category : '*Microdown-HTMLExporter' } -Microdown classSide >> asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration [ +Microdown class >> asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration [ "Facade method to render a microdown document or string to HTML" ^ MicHTMLVisitor asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration diff --git a/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st b/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st index 3a855b27..58633b82 100644 --- a/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st +++ b/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st @@ -25,7 +25,7 @@ MicRichTextCanvas >> << aText [ text := aText asText. brushes do: [ :brush | brush paint: text ]. "If no font is already put, and a body font is defined, apply it" - ((self hasFontDefinitions: text) not and: [ self textStyler bodyFont notNil]) + ((self hasFontDefinitions: text) not and: [ self textStyler bodyFont isNotNil]) ifTrue: [ text addAttribute: (TextFontReference toFont: self textStyler bodyFont)]. out << text. diff --git a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st index 11c05d50..a58b5c41 100644 --- a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st @@ -218,7 +218,7 @@ MicFileResourceReferenceTest >> testLoadImage [ ref := (MicResourceReference fromUri: 'file:/toplevel.png') filesystem: filesystem. image := ref loadImage. - self assert: image notNil. + self assert: image isNotNil. self assert: image height equals: 90. self assert: image width equals: 200 ] diff --git a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st index 9963ab06..a97911a4 100644 --- a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st @@ -88,7 +88,7 @@ MicHTTPResourceReferenceTest >> testLoadImage [ | ref image | ref := MicResourceReference fromUri: baseUrl , 'toplevel.png'. image := ref loadImage. - self assert: image notNil. + self assert: image isNotNil. self assert: image height equals: 90. self assert: image width equals: 200 ] diff --git a/src/Microdown-Tests/MicResourceSettingsTest.class.st b/src/Microdown-Tests/MicResourceSettingsTest.class.st index e976b97d..dc81b863 100644 --- a/src/Microdown-Tests/MicResourceSettingsTest.class.st +++ b/src/Microdown-Tests/MicResourceSettingsTest.class.st @@ -66,7 +66,7 @@ MicResourceSettingsTest >> testIsCashingResourcesTrue [ subject isCachingResources: true. self assert: (self cacheAt: self imageUrl) equals: nil. sample := Microdown asRichText: ('![](', self imageUrl,')' ). - self assert: (self cacheAt: self imageUrl asZnUrl ) notNil. + self assert: (self cacheAt: self imageUrl asZnUrl ) isNotNil. ] diff --git a/src/Microdown/MicAbstractBlock.class.st b/src/Microdown/MicAbstractBlock.class.st index 51dcc051..a3f5f3f3 100644 --- a/src/Microdown/MicAbstractBlock.class.st +++ b/src/Microdown/MicAbstractBlock.class.st @@ -88,7 +88,7 @@ MicAbstractBlock >> computeNestedLevel [ MicAbstractBlock >> hasProperty: aKey [ "Test if the property aKey is present." - ^ self properties notNil and: [ self properties includesKey: aKey ] + ^ self properties isNotNil and: [ self properties includesKey: aKey ] ] { #category : 'accessing' } diff --git a/src/Microdown/MicArgumentList.class.st b/src/Microdown/MicArgumentList.class.st index e996e96d..e62fe019 100644 --- a/src/Microdown/MicArgumentList.class.st +++ b/src/Microdown/MicArgumentList.class.st @@ -96,7 +96,7 @@ MicArgumentList >> hasNonDefaultArguments [ { #category : 'testing' } MicArgumentList >> hasNonDefaultValue [ "return true if the default arg was given a value" - ^ self defaultValue notNil and: [ self defaultValue ~= initialValue ] + ^ self defaultValue isNotNil and: [ self defaultValue ~= initialValue ] ] { #category : 'accessing' } diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index c6e499b4..0f9313ce 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -82,7 +82,7 @@ MicFigureBlock >> hasAnchor [ { #category : 'testing' } MicFigureBlock >> hasCaption [ - ^ captionElements notNil + ^ captionElements isNotNil ] { #category : 'testing' } From 3386fa1ba124590e96cbffeb693609ec27fe2e29 Mon Sep 17 00:00:00 2001 From: Torsten Bergmann Date: Tue, 28 May 2024 14:45:09 +0200 Subject: [PATCH 6/9] ConfigurationCommandLineHandler not existent anymore in P13 Fix #754 --- ...icParsesAndRendersAllCommentsTest.class.st | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st b/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st index b389cc07..1d257f43 100644 --- a/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st @@ -16,43 +16,6 @@ MicParsesAndRendersAllCommentsTest >> testCommentFromChunkReadStream [ Microdown asRichText: '!!' ] -{ #category : 'tests' } -MicParsesAndRendersAllCommentsTest >> testCommentFromConfigurationCommandLineHandler [ - Microdown asRichText: ConfigurationCommandLineHandler comment. - "Command line handler for dealing with Metacello configurations from the command line - -Usage: config [--help] [] [--install[=]] [--group=] [--username=] [--password=][--no-quit][--no-save] - --help show this help message - --no-quit keep the image running after configuration install - --no-save Don't save the image after configuration install - A Monticello repository name - A valid Metacello Configuration name - A valid version for the given configuration - A valid Metacello group name - An optional username to access the configuration's repository - An optional password to access the configuration's repository - -Examples: - # display this help message - pharo Pharo.image config - - # list all configurations of a repository - pharo Pharo.image config $MC_REPOS_URL - - # list all the available versions of a confgurtation - pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo - - # install the stable version - pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install - - #install a specific version '1.5' - pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5 - - #install a specific version '1.5' and only a specific group 'Tests' - pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5 --group=Tests -" -] - { #category : 'tests' } MicParsesAndRendersAllCommentsTest >> testCommentFromFluidBuilder [ "Test that we do not break on empty code blocks" From a4b8c20dcc10111ace9663556b70a5876a090f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Morales=20Durand?= Date: Wed, 14 Aug 2024 19:39:10 +0200 Subject: [PATCH 7/9] Reset textAttributes in Smalltalk text styler during initialization, so it uses the user's configured code style. --- src/Microdown-RichTextComposer/MicSmalltalkTextStyler.class.st | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microdown-RichTextComposer/MicSmalltalkTextStyler.class.st b/src/Microdown-RichTextComposer/MicSmalltalkTextStyler.class.st index d3d5e053..df220d03 100644 --- a/src/Microdown-RichTextComposer/MicSmalltalkTextStyler.class.st +++ b/src/Microdown-RichTextComposer/MicSmalltalkTextStyler.class.st @@ -17,6 +17,7 @@ MicSmalltalkTextStyler class >> initialize [ "do not super initialize, that whould interfer with settings" styleTable := SHRBTextStyler styleTable. "Not super, as that would just refer to my class-side variables" + textAttributes := nil. formatIncompleteIdentifiers := false ] From 7035e03535f4e0fa69cca8baf2303dfe1309fef4 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Fri, 18 Oct 2024 17:12:47 +0200 Subject: [PATCH 8/9] Using the compiler to evaluate expressions --- src/Microdown-RichTextComposer/MicRichTextComposer.class.st | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Microdown-RichTextComposer/MicRichTextComposer.class.st b/src/Microdown-RichTextComposer/MicRichTextComposer.class.st index bb364fc2..3e7d4763 100644 --- a/src/Microdown-RichTextComposer/MicRichTextComposer.class.st +++ b/src/Microdown-RichTextComposer/MicRichTextComposer.class.st @@ -639,7 +639,9 @@ MicRichTextComposer >> visitPharoEvaluator: aScriptBlock [ canvas := oldCanvas. codeText addAttribute: (MicRichTextDoIt new - actOnClickBlock: [ self class evaluate: script ]; + actOnClickBlock: [ OpalCompiler new + source: script; + evaluate ]; yourself). "this is a hack, because the align of the icon is attached to some top-left of the From e390aebcdc846c037529f1089bddd5cc77e89946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sun, 27 Oct 2024 12:13:34 +0100 Subject: [PATCH 9/9] Fix broken code --- src/Microdown/MicFigureBlock.class.st | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index e8963535..62205251 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -28,6 +28,7 @@ MicFigureBlock class >> closingDelimiter [ MicFigureBlock class >> openingDelimiter [ ^ FigureNameOpenerMarkup +] { #category : 'testing' } MicFigureBlock >> hasAnchor [