Skip to content

Commit

Permalink
Trying to make it more robust - I have no idea why sometimes this is …
Browse files Browse the repository at this point in the history
…microdown and sometimes this is Microdown
  • Loading branch information
Ducasse committed Jul 19, 2024
1 parent 765e5e4 commit 440fe6b
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions src/BaselineOfMicrodown/BaselineOfMicrodown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ BaselineOfMicrodown >> baseline: spec [
spec for: #common do: [
self xmlParserHtml: spec.
" I disable this because against all my best effort, I cannot avoid the fucking pop up to raise
even if I unload all the packages. I get the Microdown-RichTextComposer in conflict.
even if I unload all the packages. I get the Microdown-RichTextComposer in conflict."

spec preLoadDoIt: #'preload:package:'.

I disable this because in a postload

(IceRepository repositoryNamed: 'microdown') is nil and I do not get why
"I disable this because in a postload
(IceRepository repositoryNamed: 'microdown') is nil and I do not get why"

spec postLoadDoIt: #'postload:package:'.
"


spec
package: #Microdown;
Expand Down Expand Up @@ -101,9 +102,17 @@ BaselineOfMicrodown >> baseline: spec [

{ #category : 'baselines' }
BaselineOfMicrodown >> postload: loader package: packageSpec [

| p |
self class name, ' postload ' traceCr.
[((IceRepository repositoryNamed: 'microdown')
packageNamed: 'BaselineOfMicrodown') ifNotNil:[ :b | b reload ]] on: MCMergeOrLoadWarning do: [ :ex | ex load ]

p := (IceRepository repositoryNamed: 'microdown').
p ifNil: [ p := (IceRepository repositoryNamed: 'Microdown') ].
[
(p ifNotNil: [ :p2 | (p2 packageNamed: 'BaselineOfMicrodown') reload ])
]
on: MCMergeOrLoadWarning
do: [ :ex | ex load ]



Expand All @@ -125,16 +134,16 @@ BaselineOfMicrodown >> preload: loader package: packageSpec [

| packagesToUnload |
self class name, ' preload ' traceCr.
packagesToUnload := ((PackageOrganizer default packages
select: [ :each | each name beginsWith: 'Microdown' ]) collect: [ :each | each name ]) reject:
[ :each |
packagesToUnload := ((PackageOrganizer default packages
select: [ :each | each name beginsWith: 'Microdown' ]) collect: [ :each | each name ])
reject: [ :each |
#('Microdown-RichTextPresenter' 'Microdown-RichTextPresenter-Tests') includes: each ].
"these two are not managed by the microdown repo but the documentation.
I should rename them in the future to avoid confusion"

packagesToUnload do:
[ :each | ((IceRepository repositoryNamed: 'microdown')
packageNamed: each) unload ].
packagesToUnload do:
[ :each |
((IceRepository repositoryNamed: 'Microdown') packageNamed: each) unload ].


]
Expand Down

0 comments on commit 440fe6b

Please sign in to comment.