Skip to content

Html export from command line looks like broken #616

@Ducasse

Description

@Ducasse
pillar build html index.md
pillar build html index.md                                       [16:55:16]
NotFound: [ :each |
		each isAbstract not
			and: [ each writerName = (project configuration propertyAt: #htmlWriter) ] ] not found in OrderedCollection
OrderedCollection(Collection)>>errorNotFound:
[ self errorNotFound: aBlock ] in OrderedCollection(Collection)>>detect: in Block: [ self errorNotFound: aBlock ]
OrderedCollection(Collection)>>detect:ifFound:ifNone:
OrderedCollection(Collection)>>detect:ifNone:
OrderedCollection(Collection)>>detect:
PRHtmlDocument>>basicWriter
PRHtmlDocument(PRAbstractOutputDocument)>>writer
PRHtmlDocument(PRAbstractOutputDocument)>>getMustacheTemplateValuesFromDocument:
PRHtmlDocument>>getMustacheTemplateValuesFromDocument:
PRHtmlDocument(PRAbstractOutputDocument)>>writeDocument:
PRHtmlDocument(PRAbstractOutputDocument)>>buildOn:
[ :each |
		each file exists ifTrue: [
			status := status and: ((self documentFor: each) buildOn: aProject) ]
		"I do not know how to report if a file does not exist.
		May be producing a failure is not adequate."
	] in PRHtmlOutput(PRTarget)>>buildOn: in Block: [ :each |...
Set>>do:
PRHtmlOutput(PRTarget)>>buildOn:
PRProject>>build:
PRHtmlOutput(PRTarget)>>buildWithClapArguments:
[ :args |
			args at: #helpFlag ifPresent: [ :help | help value; exitSuccess ].
			args at: #templatable ifPresent: [(args at: #templatable) value ].
			"here, default strategy is mainRoot and the following order give strategies a priority order"
			isWithPositionals ifTrue: [
			(args at: #requestedFiles ) isExplicit ifTrue:[
				target buildStrategy: (PRBuildListStrategy list: (args occurrencesOf: #requestedFiles collect: #value) )
				] ].
			args at: #all ifPresent: [ :strat | target buildStrategy: strat value ].
			args at: #mainRoot ifPresent: [ :strat | target buildStrategy: strat value].

			target buildWithClapArguments: project ] in PRHtmlOutput class(PRTarget class)>>buildClapCommandWithId:withPositionals: in Block: [ :args |...
FullBlockClosure(BlockClosure)>>cull:
FullBlockClosure(BlockClosure)>>cull:cull:
ClapCommand(ClapParameter)>>valueFor:with:
[ super valueFor: aMatch with: arg ] in ClapCommand>>valueFor:with: in Block: [ super valueFor: aMatch with: arg ]
OrderedCollection(Collection)>>detect:ifFound:ifNone:
ClapNamedMatch(ClapCompositeMatch)>>matchedSubcommand:ifNone:
ClapCommand>>valueFor:with:
ClapNamedMatch(ClapExpression)>>value:
[ :sub | sub value: arg ] in ClapCommand>>valueFor:with: in Block: [ :sub | sub value: arg ]
FullBlockClosure(BlockClosure)>>cull:
[ :cmdMatch | foundBlock cull: cmdMatch ] in ClapNamedMatch(ClapCompositeMatch)>>matchedSubcommand:ifNone: in Block: [ :cmdMatch | foundBlock cull: cmdMatch ]
FullBlockClosure(BlockClosure)>>cull:
[ :each |
			(aBlock value: each)
				ifTrue: [ ^ foundBlock cull: each ] ] in OrderedCollection(Collection)>>detect:ifFound:ifNone: in Block: [ :each |...

The problem is that the hook for looking for writer only looks in the PR hierarchy and simply ignores the Mic one.
One ugly solution is something like

(((SystemNavigation default allImplementorsOf: #writerName) 
		collect: [ :each | each methodClass instanceSide ]) 
			 detect: [ :each | 	each isAbstract not 
						and: [ each writerName asLowercase = (aPRPillarConfiguration propertyAt: aTag) asLowercase ] ]) new

To debug

 /Users/ducasse/Documents/Pharo/vms/120-x64/Pharo.app/Contents/MacOS/Pharo /Users/ducasse/Documents/Pharo/images/P12-Pillar/P12-Pillar.image clap pillar build html index.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions