Compare commits
263 Commits
2cd6f736c2
...
v0.1.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
612744ebd0 | ||
|
|
1b4b8b4bdb | ||
|
|
5587e19f16 | ||
|
|
80f7098f9b | ||
|
|
84d2babda9 | ||
|
|
cc56b79683 | ||
|
|
0105b49d0d | ||
|
|
d79035e14d | ||
|
|
7545fb7e1a | ||
|
|
f30069efe7 | ||
|
|
d1fe2f6b09 | ||
|
|
21c60d1036 | ||
|
|
6a1bdd5fee | ||
|
|
5d20d3e99b | ||
|
|
a8fbf01124 | ||
|
|
344ef04453 | ||
|
|
ceb722e476 | ||
|
|
b04341882c | ||
|
|
494fe5cceb | ||
|
|
0110d23387 | ||
|
|
0d7a15bfeb | ||
|
|
352c20d1d8 | ||
|
|
f82d2aada1 | ||
|
|
669da4073e | ||
|
|
0056657b65 | ||
|
|
8780976c15 | ||
|
|
dc8b8d08ab | ||
|
|
93d3d9471f | ||
|
|
c7c0deed74 | ||
|
|
b32c21eb1d | ||
|
|
2e6e6fdd2b | ||
|
|
3cc2294387 | ||
|
|
40f22034da | ||
|
|
ab612f293f | ||
|
|
57c2922e4a | ||
|
|
c2eb1f51c8 | ||
|
|
b0930df788 | ||
|
|
69512f559a | ||
|
|
76a81b73ac | ||
|
|
ba291c6776 | ||
|
|
6b82b46e09 | ||
|
|
6676012eb1 | ||
|
|
facbe716e9 | ||
|
|
827f3e1c98 | ||
|
|
fcea7e5a4b | ||
|
|
dda2b1e69f | ||
|
|
f79d07a7c8 | ||
|
|
45283b48d9 | ||
|
|
08e4c646e5 | ||
|
|
f8b99ed235 | ||
|
|
6fc607cfe0 | ||
|
|
49afcf0db6 | ||
|
|
c4d7e646fc | ||
|
|
3fc3a5d1ef | ||
|
|
6e2fc362ea | ||
|
|
90fa48661c | ||
|
|
5cefcd5fac | ||
|
|
b83a103c17 | ||
|
|
d90ff5891b | ||
|
|
a3c01805b8 | ||
|
|
e3d755317d | ||
|
|
b89607fc8b | ||
|
|
51c4e2b62a | ||
|
|
a6561d37fb | ||
|
|
4e8b3eb422 | ||
|
|
2c31590974 | ||
|
|
28b2d27054 | ||
|
|
84edd10864 | ||
|
|
728a79f9a4 | ||
|
|
ad4ef50669 | ||
|
|
12cbb89861 | ||
|
|
7c471ab32e | ||
|
|
400f53e440 | ||
|
|
028aeb70aa | ||
|
|
70fafd801e | ||
|
|
bdba495f69 | ||
|
|
b0392ad6fb | ||
|
|
1c142b68c6 | ||
|
|
9060f9b26d | ||
|
|
d3c733c5ad | ||
|
|
275b4b53d1 | ||
|
|
d38e198258 | ||
|
|
27cf6c0462 | ||
|
|
c7d5c89a60 | ||
|
|
ee02e07717 | ||
|
|
a7330e38e4 | ||
|
|
08eb59acd3 | ||
|
|
da1ce2717d | ||
|
|
a8f277efe5 | ||
|
|
7f6f22717b | ||
|
|
0ef141d65e | ||
|
|
71180d19fb | ||
|
|
33091112a5 | ||
|
|
5997567233 | ||
|
|
2915a81edc | ||
|
|
df79cbd0b7 | ||
|
|
a7b9eb9db4 | ||
|
|
d262833f9b | ||
|
|
0d438a8e0f | ||
|
|
0b009511ff | ||
|
|
3bdb24ad88 | ||
|
|
fdf35ba23c | ||
|
|
cd69e08516 | ||
|
|
b54c6d366c | ||
|
|
15e8d1ab77 | ||
|
|
8502a8830d | ||
|
|
74a6101de7 | ||
|
|
ba57eb16fd | ||
|
|
c309d14776 | ||
|
|
0d728510d7 | ||
|
|
22e9bc991f | ||
|
|
564104f1e8 | ||
|
|
12ad3b09f0 | ||
|
|
eabffe5ecc | ||
|
|
b47029fdbb | ||
|
|
25b8c80d4e | ||
|
|
54825538e4 | ||
|
|
66d10a7a1b | ||
|
|
acf1205e75 | ||
|
|
2cd2f7570c | ||
|
|
f16a554154 | ||
|
|
a40a504f94 | ||
|
|
80d77ff5d6 | ||
|
|
ee92049e5d | ||
|
|
510985e97c | ||
|
|
949d0989f4 | ||
|
|
2a4d22bdd4 | ||
|
|
7a903acedc | ||
|
|
5171326d63 | ||
|
|
67f79aeb51 | ||
|
|
b2383d9f93 | ||
|
|
9e2a323f6f | ||
|
|
0fcb3f73f9 | ||
|
|
bfc9e7f58d | ||
|
|
b5f0521b56 | ||
|
|
2048d8f0b6 | ||
|
|
466716881e | ||
|
|
eb9c582fa5 | ||
|
|
214e895d85 | ||
|
|
db3086743c | ||
|
|
207a0546b0 | ||
|
|
e9480fd156 | ||
|
|
28aca041f7 | ||
|
|
d82def2a70 | ||
|
|
d471f7178b | ||
|
|
2c5c26c55f | ||
|
|
7944659802 | ||
|
|
58aca53144 | ||
|
|
6f2d90162b | ||
|
|
f170a557ed | ||
|
|
eaa38ce772 | ||
|
|
a6d742a536 | ||
|
|
45be9e7bde | ||
|
|
f6c895319f | ||
|
|
2682779534 | ||
|
|
b48d472546 | ||
|
|
ea6faf728c | ||
|
|
f4ea1b7303 | ||
|
|
80b55fdd45 | ||
|
|
f426e32798 | ||
|
|
66037356c5 | ||
|
|
1bcd1895c0 | ||
|
|
e3d38cfbe2 | ||
|
|
2ba0dc49be | ||
|
|
9df40fb13f | ||
|
|
cc671925db | ||
|
|
950baa9d5d | ||
|
|
56865c68fc | ||
|
|
f592b73ae7 | ||
|
|
3206027b96 | ||
|
|
3e6df7ba78 | ||
|
|
ac313d093e | ||
|
|
f376f1cf8e | ||
|
|
f21385a901 | ||
|
|
1d06d95bb1 | ||
|
|
bfc88c1d1b | ||
|
|
f29720e5b9 | ||
|
|
27a9b5aeb1 | ||
|
|
8051c3d2b7 | ||
|
|
bd97d2f69d | ||
|
|
14b1d0526c | ||
|
|
288350daef | ||
|
|
c683516620 | ||
|
|
e731e8ff6b | ||
|
|
4c2037ec44 | ||
|
|
a46b358549 | ||
|
|
ec813e3b3f | ||
|
|
f11f7bcc73 | ||
|
|
9e0e5f6f0a | ||
|
|
16e788c36c | ||
|
|
b35d785e73 | ||
|
|
1952d175c0 | ||
|
|
20c17c40be | ||
|
|
b6b869df25 | ||
|
|
18a396b7cb | ||
|
|
085490476e | ||
|
|
9c9964c66f | ||
|
|
1a3e26c148 | ||
|
|
e9e6a8ff64 | ||
|
|
b124317f30 | ||
|
|
ad389f0776 | ||
|
|
75dfc7f812 | ||
|
|
c17de8ef5e | ||
|
|
378b6bb391 | ||
|
|
cc86591a6c | ||
|
|
f25dbc1d7c | ||
|
|
daee50c160 | ||
|
|
3e143796f7 | ||
|
|
9cc5e63c1b | ||
|
|
be6197e4c7 | ||
|
|
2d4e54845b | ||
|
|
d5ea650b96 | ||
|
|
60363579b5 | ||
|
|
1b678fe81f | ||
|
|
bfea828e62 | ||
|
|
bc5745a95f | ||
|
|
efa372a9e9 | ||
|
|
2fb57daaec | ||
|
|
3a38f4cd35 | ||
|
|
45e16fea2d | ||
|
|
5134cece7b | ||
|
|
19432d91ab | ||
|
|
16a107eebb | ||
|
|
77348b560c | ||
|
|
fc79507ef3 | ||
|
|
9c1e6ccc97 | ||
|
|
0dbc8f0925 | ||
|
|
02fe10fba3 | ||
|
|
33d7ae03d1 | ||
|
|
03faa7257f | ||
|
|
ae3510abd5 | ||
|
|
ad3f47864a | ||
|
|
533ef2a9a8 | ||
|
|
cf37bc4111 | ||
|
|
e5224cda63 | ||
|
|
64e3481660 | ||
|
|
32071ce74d | ||
|
|
e84e2b5147 | ||
|
|
3348807a05 | ||
|
|
720afa5d32 | ||
|
|
dab598e5e7 | ||
|
|
b7a5dd48ea | ||
|
|
c475dce6da | ||
|
|
6d1675fa00 | ||
|
|
cda49c628c | ||
|
|
65b87bd65d | ||
|
|
5a7f34b63e | ||
|
|
edff1e089d | ||
|
|
bc29f1dfc0 | ||
|
|
e4656cddf6 | ||
|
|
1e3dadd458 | ||
|
|
2ec055af5a | ||
|
|
6823db5c60 | ||
|
|
21e1ceb8e0 | ||
|
|
655af88cdf | ||
|
|
8561fdc1bd | ||
|
|
f2089257b0 | ||
|
|
09821c8898 | ||
|
|
69ecfd2646 | ||
|
|
8162f03051 | ||
|
|
d8c3285e3c | ||
|
|
5db6cd617e | ||
|
|
4cd3697fb0 |
@@ -1,3 +1,4 @@
|
|||||||
**/.git
|
**/.git
|
||||||
target
|
target
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
notes/
|
||||||
|
|||||||
203
.lighthouse/pipeline-foreign-document-test.yaml
Normal file
203
.lighthouse/pipeline-foreign-document-test.yaml
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: PipelineRun
|
||||||
|
metadata:
|
||||||
|
name: rust-foreign-document-test
|
||||||
|
spec:
|
||||||
|
pipelineSpec:
|
||||||
|
timeouts:
|
||||||
|
pipeline: "2h0m0s"
|
||||||
|
tasks: "1h0m40s"
|
||||||
|
finally: "0h30m0s"
|
||||||
|
params:
|
||||||
|
- name: image-name
|
||||||
|
description: The name for the built image
|
||||||
|
type: string
|
||||||
|
- name: path-to-image-context
|
||||||
|
description: The path to the build context
|
||||||
|
type: string
|
||||||
|
- name: path-to-dockerfile
|
||||||
|
description: The path to the Dockerfile
|
||||||
|
type: string
|
||||||
|
tasks:
|
||||||
|
- name: do-stuff
|
||||||
|
taskSpec:
|
||||||
|
metadata: {}
|
||||||
|
stepTemplate:
|
||||||
|
image: alpine:3.18
|
||||||
|
name: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 600Mi
|
||||||
|
workingDir: /workspace/source
|
||||||
|
steps:
|
||||||
|
- image: alpine:3.18
|
||||||
|
name: do-stuff-step
|
||||||
|
script: |
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
echo "hello world"
|
||||||
|
- name: report-pending
|
||||||
|
taskRef:
|
||||||
|
name: gitea-set-status
|
||||||
|
runAfter:
|
||||||
|
- fetch-repository
|
||||||
|
params:
|
||||||
|
- name: CONTEXT
|
||||||
|
value: "$(params.JOB_NAME)"
|
||||||
|
- name: REPO_FULL_NAME
|
||||||
|
value: "$(params.REPO_OWNER)/$(params.REPO_NAME)"
|
||||||
|
- name: GITEA_HOST_URL
|
||||||
|
value: code.fizz.buzz
|
||||||
|
- name: SHA
|
||||||
|
value: "$(tasks.fetch-repository.results.commit)"
|
||||||
|
- name: DESCRIPTION
|
||||||
|
value: "Build $(params.JOB_NAME) has started"
|
||||||
|
- name: STATE
|
||||||
|
value: pending
|
||||||
|
- name: TARGET_URL
|
||||||
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
|
- name: fetch-repository
|
||||||
|
taskRef:
|
||||||
|
name: git-clone
|
||||||
|
workspaces:
|
||||||
|
- name: output
|
||||||
|
workspace: git-source
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: $(params.REPO_URL)
|
||||||
|
- name: revision
|
||||||
|
value: $(params.PULL_BASE_SHA)
|
||||||
|
- name: deleteExisting
|
||||||
|
value: "true"
|
||||||
|
- name: build-image
|
||||||
|
taskRef:
|
||||||
|
name: kaniko
|
||||||
|
params:
|
||||||
|
- name: IMAGE
|
||||||
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
|
- name: CONTEXT
|
||||||
|
value: $(params.path-to-image-context)
|
||||||
|
- name: DOCKERFILE
|
||||||
|
value: $(params.path-to-dockerfile)
|
||||||
|
- name: BUILDER_IMAGE
|
||||||
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
|
- name: EXTRA_ARGS
|
||||||
|
value:
|
||||||
|
- --target=foreign-document-test
|
||||||
|
- --cache=true
|
||||||
|
- --cache-copy-layers
|
||||||
|
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||||
|
- --use-new-run # Should result in a speed-up
|
||||||
|
- --reproducible # To remove timestamps so layer caching works.
|
||||||
|
- --snapshot-mode=redo
|
||||||
|
- --skip-unused-stages=true
|
||||||
|
- --registry-mirror=dockerhub.dockerhub.svc.cluster.local
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: git-source
|
||||||
|
- name: dockerconfig
|
||||||
|
workspace: docker-credentials
|
||||||
|
runAfter:
|
||||||
|
- fetch-repository
|
||||||
|
- name: run-image
|
||||||
|
taskRef:
|
||||||
|
name: run-docker-image
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: git-source
|
||||||
|
- name: cargo-cache
|
||||||
|
workspace: cargo-cache
|
||||||
|
runAfter:
|
||||||
|
- build-image
|
||||||
|
params:
|
||||||
|
- name: docker-image
|
||||||
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
|
finally:
|
||||||
|
- name: report-success
|
||||||
|
when:
|
||||||
|
- input: "$(tasks.status)"
|
||||||
|
operator: in
|
||||||
|
values: ["Succeeded", "Completed"]
|
||||||
|
taskRef:
|
||||||
|
name: gitea-set-status
|
||||||
|
params:
|
||||||
|
- name: CONTEXT
|
||||||
|
value: "$(params.JOB_NAME)"
|
||||||
|
- name: REPO_FULL_NAME
|
||||||
|
value: "$(params.REPO_OWNER)/$(params.REPO_NAME)"
|
||||||
|
- name: GITEA_HOST_URL
|
||||||
|
value: code.fizz.buzz
|
||||||
|
- name: SHA
|
||||||
|
value: "$(tasks.fetch-repository.results.commit)"
|
||||||
|
- name: DESCRIPTION
|
||||||
|
value: "Build $(params.JOB_NAME) has succeeded"
|
||||||
|
- name: STATE
|
||||||
|
value: success
|
||||||
|
- name: TARGET_URL
|
||||||
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
|
- name: report-failure
|
||||||
|
when:
|
||||||
|
- input: "$(tasks.status)"
|
||||||
|
operator: in
|
||||||
|
values: ["Failed"]
|
||||||
|
taskRef:
|
||||||
|
name: gitea-set-status
|
||||||
|
params:
|
||||||
|
- name: CONTEXT
|
||||||
|
value: "$(params.JOB_NAME)"
|
||||||
|
- name: REPO_FULL_NAME
|
||||||
|
value: "$(params.REPO_OWNER)/$(params.REPO_NAME)"
|
||||||
|
- name: GITEA_HOST_URL
|
||||||
|
value: code.fizz.buzz
|
||||||
|
- name: SHA
|
||||||
|
value: "$(tasks.fetch-repository.results.commit)"
|
||||||
|
- name: DESCRIPTION
|
||||||
|
value: "Build $(params.JOB_NAME) has failed"
|
||||||
|
- name: STATE
|
||||||
|
value: failure
|
||||||
|
- name: TARGET_URL
|
||||||
|
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
|
||||||
|
- name: cargo-cache-autoclean
|
||||||
|
taskRef:
|
||||||
|
name: run-docker-image
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: git-source
|
||||||
|
- name: cargo-cache
|
||||||
|
workspace: cargo-cache
|
||||||
|
params:
|
||||||
|
- name: command
|
||||||
|
value: [cargo, cache, --autoclean]
|
||||||
|
- name: args
|
||||||
|
value: []
|
||||||
|
- name: docker-image
|
||||||
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
|
workspaces:
|
||||||
|
- name: git-source
|
||||||
|
- name: docker-credentials
|
||||||
|
- name: cargo-cache
|
||||||
|
workspaces:
|
||||||
|
- name: git-source
|
||||||
|
volumeClaimTemplate:
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
subPath: rust-source
|
||||||
|
- name: cargo-cache
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: organic-cargo-cache-test-foreign-document
|
||||||
|
- name: docker-credentials
|
||||||
|
secret:
|
||||||
|
secretName: harbor-plain
|
||||||
|
serviceAccountName: build-bot
|
||||||
|
params:
|
||||||
|
- name: image-name
|
||||||
|
value: "harbor.fizz.buzz/private/organic-test-foreign-document"
|
||||||
|
- name: path-to-image-context
|
||||||
|
value: docker/organic_test/
|
||||||
|
- name: path-to-dockerfile
|
||||||
|
value: docker/organic_test/Dockerfile
|
||||||
@@ -14,10 +14,6 @@ spec:
|
|||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
description: The path to the Dockerfile
|
description: The path to the Dockerfile
|
||||||
type: string
|
type: string
|
||||||
- name: command
|
|
||||||
type: array
|
|
||||||
description: Command to run.
|
|
||||||
default: []
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: report-pending
|
- name: report-pending
|
||||||
taskRef:
|
taskRef:
|
||||||
@@ -92,8 +88,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: ["--no-default-features"]
|
value: ["--no-default-features"]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
@@ -109,8 +103,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- run-image-none
|
- run-image-none
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: ["--no-default-features", "--features", "tracing"]
|
value: ["--no-default-features", "--features", "tracing"]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
@@ -126,8 +118,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- run-image-tracing
|
- run-image-tracing
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: ["--no-default-features", "--features", "compare"]
|
value: ["--no-default-features", "--features", "compare"]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
@@ -143,8 +133,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- run-image-compare
|
- run-image-compare
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: []
|
value: []
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
@@ -160,8 +148,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- run-image-default
|
- run-image-default
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: ["--no-default-features", "--features", "tracing,compare"]
|
value: ["--no-default-features", "--features", "tracing,compare"]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
@@ -256,5 +242,3 @@ spec:
|
|||||||
value: docker/organic_build/
|
value: docker/organic_build/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/organic_build/Dockerfile
|
value: docker/organic_build/Dockerfile
|
||||||
- name: command
|
|
||||||
value: [cargo, build]
|
|
||||||
|
|||||||
@@ -18,14 +18,6 @@ spec:
|
|||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
description: The path to the Dockerfile
|
description: The path to the Dockerfile
|
||||||
type: string
|
type: string
|
||||||
- name: command
|
|
||||||
type: array
|
|
||||||
description: Command to run.
|
|
||||||
default: []
|
|
||||||
- name: args
|
|
||||||
type: array
|
|
||||||
description: Arguments passed to command.
|
|
||||||
default: []
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: do-stuff
|
- name: do-stuff
|
||||||
taskSpec:
|
taskSpec:
|
||||||
@@ -91,6 +83,7 @@ spec:
|
|||||||
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
value: "gcr.io/kaniko-project/executor:v1.12.1"
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
|
- --target=tester
|
||||||
- --cache=true
|
- --cache=true
|
||||||
- --cache-copy-layers
|
- --cache-copy-layers
|
||||||
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
- --cache-repo=harbor.fizz.buzz/kanikocache/cache
|
||||||
@@ -117,10 +110,17 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.command[*])"]
|
|
||||||
- name: args
|
- name: args
|
||||||
value: ["$(params.args[*])"]
|
value:
|
||||||
|
[
|
||||||
|
--no-default-features,
|
||||||
|
--features,
|
||||||
|
compare,
|
||||||
|
--no-fail-fast,
|
||||||
|
--lib,
|
||||||
|
--test,
|
||||||
|
test_loader,
|
||||||
|
]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
finally:
|
finally:
|
||||||
@@ -212,7 +212,3 @@ spec:
|
|||||||
value: docker/organic_test/
|
value: docker/organic_test/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/organic_test/Dockerfile
|
value: docker/organic_test/Dockerfile
|
||||||
- name: command
|
|
||||||
value: [cargo, test]
|
|
||||||
- name: args
|
|
||||||
value: [--lib, --test, test_loader]
|
|
||||||
|
|||||||
@@ -14,14 +14,6 @@ spec:
|
|||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
description: The path to the Dockerfile
|
description: The path to the Dockerfile
|
||||||
type: string
|
type: string
|
||||||
- name: rustfmt-command
|
|
||||||
type: array
|
|
||||||
description: Command to run rustfmt.
|
|
||||||
default: []
|
|
||||||
- name: rustfmt-args
|
|
||||||
type: array
|
|
||||||
description: Arguments passed to rustfmt.
|
|
||||||
default: []
|
|
||||||
- name: GIT_USER_NAME
|
- name: GIT_USER_NAME
|
||||||
description: The username for git
|
description: The username for git
|
||||||
type: string
|
type: string
|
||||||
@@ -119,10 +111,6 @@ spec:
|
|||||||
runAfter:
|
runAfter:
|
||||||
- build-image
|
- build-image
|
||||||
params:
|
params:
|
||||||
- name: command
|
|
||||||
value: ["$(params.rustfmt-command[*])"]
|
|
||||||
- name: args
|
|
||||||
value: ["$(params.rustfmt-args[*])"]
|
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
- name: cargo-fix
|
- name: cargo-fix
|
||||||
@@ -240,7 +228,3 @@ spec:
|
|||||||
value: docker/cargo_fmt/
|
value: docker/cargo_fmt/
|
||||||
- name: path-to-dockerfile
|
- name: path-to-dockerfile
|
||||||
value: docker/cargo_fmt/Dockerfile
|
value: docker/cargo_fmt/Dockerfile
|
||||||
- name: command
|
|
||||||
value: [cargo, fmt]
|
|
||||||
- name: args
|
|
||||||
value: []
|
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ spec:
|
|||||||
skip_branches:
|
skip_branches:
|
||||||
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
||||||
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||||
|
- name: rust-foreign-document-test
|
||||||
|
source: "pipeline-foreign-document-test.yaml"
|
||||||
|
# Override https-based url from lighthouse events.
|
||||||
|
clone_uri: "git@code.fizz.buzz:talexander/organic.git"
|
||||||
|
skip_branches:
|
||||||
|
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing.
|
||||||
|
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
|
||||||
- name: rust-build
|
- name: rust-build
|
||||||
source: "pipeline-rust-build.yaml"
|
source: "pipeline-rust-build.yaml"
|
||||||
# Override https-based url from lighthouse events.
|
# Override https-based url from lighthouse events.
|
||||||
|
|||||||
19
Cargo.toml
19
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "organic"
|
name = "organic"
|
||||||
version = "0.1.2"
|
version = "0.1.6"
|
||||||
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
||||||
description = "An org-mode parser."
|
description = "An org-mode parser."
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -13,8 +13,7 @@ resolver = "2"
|
|||||||
include = [
|
include = [
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"**/*.rs",
|
"**/*.rs",
|
||||||
"Cargo.toml",
|
"Cargo.toml"
|
||||||
"tests/*"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -23,7 +22,7 @@ path = "src/lib.rs"
|
|||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
# This bin exists for development purposes only. The real target of this crate is the library.
|
# This bin exists for development purposes only. The real target of this crate is the library.
|
||||||
name = "compare"
|
name = "parse"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@@ -40,10 +39,18 @@ tracing-subscriber = { version = "0.3.17", optional = true, features = ["env-fil
|
|||||||
walkdir = "2.3.3"
|
walkdir = "2.3.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["compare", "tracing"]
|
default = []
|
||||||
compare = []
|
compare = []
|
||||||
tracing = ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tokio", "dep:tracing", "dep:tracing-opentelemetry", "dep:tracing-subscriber"]
|
tracing = ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tokio", "dep:tracing", "dep:tracing-opentelemetry", "dep:tracing-subscriber"]
|
||||||
|
|
||||||
[profile.release]
|
# Optimized build for any sort of release.
|
||||||
|
[profile.release-lto]
|
||||||
|
inherits = "release"
|
||||||
lto = true
|
lto = true
|
||||||
strip = "symbols"
|
strip = "symbols"
|
||||||
|
|
||||||
|
# Profile for performance testing with the "perf" tool. Notably keeps debug enabled and does not strip symbols to make reading the perf output easier.
|
||||||
|
[profile.perf]
|
||||||
|
inherits = "release"
|
||||||
|
lto = true
|
||||||
|
debug = true
|
||||||
|
|||||||
14
Makefile
14
Makefile
@@ -35,12 +35,16 @@ clean:
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
> cargo test --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
> cargo test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
.PHONY: dockertest
|
.PHONY: dockertest
|
||||||
dockertest:
|
dockertest:
|
||||||
> $(MAKE) -C docker/organic_test
|
> $(MAKE) -C docker/organic_test
|
||||||
> docker run --rm -i -t -v "$$(readlink -f ./):/source:ro" --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test cargo test --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
|
.PHONY: foreign_document_test
|
||||||
|
foreign_document_test:
|
||||||
|
> $(MAKE) -C docker/organic_test run_foreign_document_test
|
||||||
|
|
||||||
.PHONY: dockerclean
|
.PHONY: dockerclean
|
||||||
dockerclean:
|
dockerclean:
|
||||||
@@ -49,18 +53,18 @@ dockerclean:
|
|||||||
|
|
||||||
.PHONY: integrationtest
|
.PHONY: integrationtest
|
||||||
integrationtest:
|
integrationtest:
|
||||||
> cargo test --no-fail-fast --test test_loader -- --test-threads $(TESTJOBS)
|
> cargo test --no-default-features --features compare --no-fail-fast --test test_loader -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
.PHONY: unittest
|
.PHONY: unittest
|
||||||
unittest:
|
unittest:
|
||||||
> cargo test --lib -- --test-threads $(TESTJOBS)
|
> cargo test --no-default-features --lib -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
.PHONY: jaeger
|
.PHONY: jaeger
|
||||||
jaeger:
|
jaeger:
|
||||||
# 4317 for OTLP gRPC, 4318 for OTLP HTTP. We currently use gRPC but I forward both ports regardless.
|
# 4317 for OTLP gRPC, 4318 for OTLP HTTP. We currently use gRPC but I forward both ports regardless.
|
||||||
#
|
#
|
||||||
# These flags didn't help even though they seem like they would: --collector.queue-size=20000 --collector.num-workers=100
|
# These flags didn't help even though they seem like they would: --collector.queue-size=20000 --collector.num-workers=100
|
||||||
> docker run -d --rm --name organicdocker -p 4317:4317 -p 4318:4318 -p 16686:16686 -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:1.47 --collector.grpc-server.max-message-size=20000000 --collector.otlp.grpc.max-message-size=20000000
|
> docker run -d --rm --name organicdocker --read-only -p 4317:4317 -p 4318:4318 -p 16686:16686 -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:1.47 --collector.grpc-server.max-message-size=20000000 --collector.otlp.grpc.max-message-size=20000000
|
||||||
|
|
||||||
.PHONY: jaegerweb
|
.PHONY: jaegerweb
|
||||||
jaegerweb:
|
jaegerweb:
|
||||||
|
|||||||
25
build.rs
25
build.rs
@@ -1,10 +1,16 @@
|
|||||||
|
#[cfg(feature = "compare")]
|
||||||
use std::env;
|
use std::env;
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
fn main() {
|
fn main() {
|
||||||
let out_dir = env::var("OUT_DIR").unwrap();
|
let out_dir = env::var("OUT_DIR").unwrap();
|
||||||
let destination = Path::new(&out_dir).join("tests.rs");
|
let destination = Path::new(&out_dir).join("tests.rs");
|
||||||
@@ -31,6 +37,10 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "compare"))]
|
||||||
|
fn main() {}
|
||||||
|
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
fn write_test(test_file: &mut File, test: &walkdir::DirEntry) {
|
fn write_test(test_file: &mut File, test: &walkdir::DirEntry) {
|
||||||
let test_name = test
|
let test_name = test
|
||||||
.path()
|
.path()
|
||||||
@@ -41,6 +51,7 @@ fn write_test(test_file: &mut File, test: &walkdir::DirEntry) {
|
|||||||
.strip_suffix(".org")
|
.strip_suffix(".org")
|
||||||
.expect("Should have .org extension")
|
.expect("Should have .org extension")
|
||||||
.replace("/", "_");
|
.replace("/", "_");
|
||||||
|
let test_name = format!("autogen_{}", test_name);
|
||||||
|
|
||||||
if let Some(_reason) = is_expect_fail(test_name.as_str()) {
|
if let Some(_reason) = is_expect_fail(test_name.as_str()) {
|
||||||
write!(test_file, "#[ignore]\n").unwrap();
|
write!(test_file, "#[ignore]\n").unwrap();
|
||||||
@@ -54,14 +65,15 @@ fn write_test(test_file: &mut File, test: &walkdir::DirEntry) {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
fn write_header(test_file: &mut File) {
|
fn write_header(test_file: &mut File) {
|
||||||
write!(
|
write!(
|
||||||
test_file,
|
test_file,
|
||||||
r#"
|
r#"
|
||||||
#[feature(exit_status_error)]
|
#[feature(exit_status_error)]
|
||||||
use organic::compare_document;
|
use organic::compare_document;
|
||||||
use organic::parser::document;
|
use organic::parser::parse;
|
||||||
use organic::emacs_parse_org_document;
|
use organic::emacs_parse_anonymous_org_document;
|
||||||
use organic::parser::sexp::sexp_with_padding;
|
use organic::parser::sexp::sexp_with_padding;
|
||||||
|
|
||||||
"#
|
"#
|
||||||
@@ -69,13 +81,12 @@ use organic::parser::sexp::sexp_with_padding;
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "compare")]
|
||||||
fn is_expect_fail(name: &str) -> Option<&str> {
|
fn is_expect_fail(name: &str) -> Option<&str> {
|
||||||
match name {
|
match name {
|
||||||
"drawer_drawer_with_headline_inside" => Some("Apparently lines with :end: become their own paragraph. This odd behavior needs to be investigated more."),
|
"autogen_greater_element_drawer_drawer_with_headline_inside" => Some("Apparently lines with :end: become their own paragraph. This odd behavior needs to be investigated more."),
|
||||||
"element_container_priority_footnote_definition_dynamic_block" => Some("Apparently broken begin lines become their own paragraph."),
|
"autogen_element_container_priority_footnote_definition_dynamic_block" => Some("Apparently broken begin lines become their own paragraph."),
|
||||||
"paragraphs_paragraph_with_backslash_line_breaks" => Some("The text we're getting out of the parse tree is already processed to remove line breaks, so our comparison needs to take that into account."),
|
"autogen_lesser_element_paragraphs_paragraph_with_backslash_line_breaks" => Some("The text we're getting out of the parse tree is already processed to remove line breaks, so our comparison needs to take that into account."),
|
||||||
"export_snippet_paragraph_break_precedence" => Some("The latest code for org-mode is matching the export snippet without the closing @@."), // https://list.orgmode.org/orgmode/fb61ea28-f004-4c25-adf7-69fc55683ed4@app.fastmail.com/T/#u
|
|
||||||
"plain_lists_trailing_whitespace_ownership" => Some("Seeing odd behavior about whitespace ownership."),
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ all: build push
|
|||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
docker build -t $(IMAGE_NAME) -f Dockerfile ../
|
docker build -t $(IMAGE_NAME) -f Dockerfile .
|
||||||
|
|
||||||
.PHONY: push
|
.PHONY: push
|
||||||
push:
|
push:
|
||||||
@@ -26,10 +26,11 @@ else
|
|||||||
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# NOTE: This target will write to folders underneath the git-root
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run: build
|
||||||
docker run --rm -i -t $(IMAGE_NAME)
|
docker run --rm --init --read-only --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source" --workdir=/source $(IMAGE_NAME)
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell:
|
shell: build
|
||||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
docker run --rm -i -t --entrypoint /bin/sh --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source" --workdir=/source $(IMAGE_NAME)
|
||||||
|
|||||||
@@ -2,3 +2,5 @@ FROM rustlang/rust:nightly-alpine3.17
|
|||||||
|
|
||||||
RUN apk add --no-cache musl-dev
|
RUN apk add --no-cache musl-dev
|
||||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||||
|
|
||||||
|
ENTRYPOINT ["cargo", "build"]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ all: build push
|
|||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
docker build -t $(IMAGE_NAME) -f Dockerfile ../
|
docker build -t $(IMAGE_NAME) -f Dockerfile .
|
||||||
|
|
||||||
.PHONY: push
|
.PHONY: push
|
||||||
push:
|
push:
|
||||||
@@ -25,11 +25,13 @@ ifdef REMOTE_REPO
|
|||||||
else
|
else
|
||||||
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||||
endif
|
endif
|
||||||
|
docker volume rm cargo-cache
|
||||||
|
|
||||||
|
# NOTE: This target will write to folders underneath the git-root
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run: build
|
||||||
docker run --rm -i -t $(IMAGE_NAME)
|
docker run --rm --init --read-only --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry $(IMAGE_NAME)
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell:
|
shell: build
|
||||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
docker run --rm -i -t --entrypoint /bin/sh --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry $(IMAGE_NAME)
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
FROM alpine:3.17 AS build
|
FROM alpine:3.17 AS build
|
||||||
|
|
||||||
RUN apk add --no-cache build-base musl-dev git autoconf make texinfo gnutls-dev ncurses-dev gawk
|
RUN apk add --no-cache build-base musl-dev git autoconf make texinfo gnutls-dev ncurses-dev gawk
|
||||||
|
|
||||||
|
|
||||||
FROM build AS build-emacs
|
FROM build AS build-emacs
|
||||||
|
ARG EMACS_VERSION=emacs-29.1
|
||||||
RUN git clone --depth 1 --branch emacs-29.1 https://git.savannah.gnu.org/git/emacs.git /root/emacs
|
RUN git clone --depth 1 --branch $EMACS_VERSION https://git.savannah.gnu.org/git/emacs.git /root/emacs
|
||||||
WORKDIR /root/emacs
|
WORKDIR /root/emacs
|
||||||
RUN mkdir /root/dist
|
RUN mkdir /root/dist
|
||||||
RUN ./autogen.sh
|
RUN ./autogen.sh
|
||||||
@@ -15,16 +14,88 @@ RUN make DESTDIR="/root/dist" install
|
|||||||
|
|
||||||
|
|
||||||
FROM build AS build-org-mode
|
FROM build AS build-org-mode
|
||||||
|
ARG ORG_VERSION=163bafb43dcc2bc94a2c7ccaa77d3d1dd488f1af
|
||||||
COPY --from=build-emacs /root/dist/ /
|
COPY --from=build-emacs /root/dist/ /
|
||||||
RUN mkdir /root/dist
|
RUN mkdir /root/dist
|
||||||
RUN mkdir /root/org-mode && git -C /root/org-mode init && git -C /root/org-mode remote add origin https://git.savannah.gnu.org/git/emacs/org-mode.git && git -C /root/org-mode fetch origin b89bc55867d7cb809c379d371d12d409db785154 && git -C /root/org-mode checkout FETCH_HEAD
|
# Savannah does not allow fetching specific revisions, so we're going to have to put unnecessary load on their server by cloning main and then checking out the revision we want.
|
||||||
|
RUN git clone https://git.savannah.gnu.org/git/emacs/org-mode.git /root/org-mode && git -C /root/org-mode checkout $ORG_VERSION
|
||||||
|
# RUN mkdir /root/org-mode && git -C /root/org-mode init --initial-branch=main && git -C /root/org-mode remote add origin https://git.savannah.gnu.org/git/emacs/org-mode.git && git -C /root/org-mode fetch origin $ORG_VERSION && git -C /root/org-mode checkout FETCH_HEAD
|
||||||
WORKDIR /root/org-mode
|
WORKDIR /root/org-mode
|
||||||
RUN make compile
|
RUN make compile
|
||||||
RUN make DESTDIR="/root/dist" install
|
RUN make DESTDIR="/root/dist" install
|
||||||
|
|
||||||
|
|
||||||
FROM rustlang/rust:nightly-alpine3.17
|
FROM rustlang/rust:nightly-alpine3.17 AS tester
|
||||||
|
ENV LANG=en_US.UTF-8
|
||||||
RUN apk add --no-cache musl-dev ncurses gnutls
|
RUN apk add --no-cache musl-dev ncurses gnutls
|
||||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||||
COPY --from=build-emacs /root/dist/ /
|
COPY --from=build-emacs /root/dist/ /
|
||||||
COPY --from=build-org-mode /root/dist/ /
|
COPY --from=build-org-mode /root/dist/ /
|
||||||
|
|
||||||
|
ENTRYPOINT ["cargo", "test"]
|
||||||
|
|
||||||
|
|
||||||
|
FROM build as foreign-document-gather
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_DOT_FILES_VERSION=1b54fe75d74670dc7bcbb6b01ea560c45528c628
|
||||||
|
ARG HOWARD_ABRAMS_DOT_FILES_PATH=/foreign_documents/howardabrams/dot-files
|
||||||
|
ARG HOWARD_ABRAMS_DOT_FILES_REPO=https://github.com/howardabrams/dot-files.git
|
||||||
|
RUN mkdir /foreign_documents
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_DOT_FILES_PATH && git -C $HOWARD_ABRAMS_DOT_FILES_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_DOT_FILES_PATH remote add origin $HOWARD_ABRAMS_DOT_FILES_REPO && git -C $HOWARD_ABRAMS_DOT_FILES_PATH fetch origin $HOWARD_ABRAMS_DOT_FILES_VERSION && git -C $HOWARD_ABRAMS_DOT_FILES_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_HAMACS_VERSION=da51188cc195d41882175d412fe40a8bc5730c5c
|
||||||
|
ARG HOWARD_ABRAMS_HAMACS_PATH=/foreign_documents/howardabrams/hamacs
|
||||||
|
ARG HOWARD_ABRAMS_HAMACS_REPO=https://github.com/howardabrams/hamacs.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_HAMACS_PATH && git -C $HOWARD_ABRAMS_HAMACS_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_HAMACS_PATH remote add origin $HOWARD_ABRAMS_HAMACS_REPO && git -C $HOWARD_ABRAMS_HAMACS_PATH fetch origin $HOWARD_ABRAMS_HAMACS_VERSION && git -C $HOWARD_ABRAMS_HAMACS_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_DEMO_IT_VERSION=e399fd7ceb73caeae7cb50b247359bafcaee2a3f
|
||||||
|
ARG HOWARD_ABRAMS_DEMO_IT_PATH=/foreign_documents/howardabrams/demo-it
|
||||||
|
ARG HOWARD_ABRAMS_DEMO_IT_REPO=https://github.com/howardabrams/demo-it.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_DEMO_IT_PATH && git -C $HOWARD_ABRAMS_DEMO_IT_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_DEMO_IT_PATH remote add origin $HOWARD_ABRAMS_DEMO_IT_REPO && git -C $HOWARD_ABRAMS_DEMO_IT_PATH fetch origin $HOWARD_ABRAMS_DEMO_IT_VERSION && git -C $HOWARD_ABRAMS_DEMO_IT_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_MAGIT_DEMO_VERSION=59e82f6bc7c18f550478d86a8f680c3f2da66985
|
||||||
|
ARG HOWARD_ABRAMS_MAGIT_DEMO_PATH=/foreign_documents/howardabrams/magit-demo
|
||||||
|
ARG HOWARD_ABRAMS_MAGIT_DEMO_REPO=https://github.com/howardabrams/magit-demo.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_MAGIT_DEMO_PATH && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH remote add origin $HOWARD_ABRAMS_MAGIT_DEMO_REPO && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH fetch origin $HOWARD_ABRAMS_MAGIT_DEMO_VERSION && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_VERSION=bfb7bd640fdf0ce3def21f9fc591ed35d776b26d
|
||||||
|
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH=/foreign_documents/howardabrams/pdx-emacs-hackers
|
||||||
|
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_REPO=https://github.com/howardabrams/pdx-emacs-hackers.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH remote add origin $HOWARD_ABRAMS_PDX_EMACS_HACKERS_REPO && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH fetch origin $HOWARD_ABRAMS_PDX_EMACS_HACKERS_VERSION && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_VERSION=50de13068722b9e3878f8598b749b7ccd14e7f8e
|
||||||
|
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_PATH=/foreign_documents/howardabrams/flora-simulator
|
||||||
|
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_REPO=https://github.com/howardabrams/flora-simulator.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH remote add origin $HOWARD_ABRAMS_FLORA_SIMULATOR_REPO && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH fetch origin $HOWARD_ABRAMS_FLORA_SIMULATOR_VERSION && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_VERSION=2d7a5e41001a1adf7ec24aeb6acc8525a72d7892
|
||||||
|
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH=/foreign_documents/howardabrams/literate-devops-demo
|
||||||
|
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_REPO=https://github.com/howardabrams/literate-devops-demo.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH remote add origin $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_REPO && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH fetch origin $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_VERSION && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_VERSION=b651c7f8b47b2710e99fce9652980902bbc1c6c9
|
||||||
|
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH=/foreign_documents/howardabrams/clojure-yesql-xp
|
||||||
|
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_REPO=https://github.com/howardabrams/clojure-yesql-xp.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH remote add origin $HOWARD_ABRAMS_CLOJURE_YESQL_XP_REPO && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH fetch origin $HOWARD_ABRAMS_CLOJURE_YESQL_XP_VERSION && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG HOWARD_ABRAMS_VEEP_VERSION=e37fcf63a5c4a526255735ee34955528b3b280ae
|
||||||
|
ARG HOWARD_ABRAMS_VEEP_PATH=/foreign_documents/howardabrams/veep
|
||||||
|
ARG HOWARD_ABRAMS_VEEP_REPO=https://github.com/howardabrams/veep.git
|
||||||
|
RUN mkdir -p $HOWARD_ABRAMS_VEEP_PATH && git -C $HOWARD_ABRAMS_VEEP_PATH init --initial-branch=main && git -C $HOWARD_ABRAMS_VEEP_PATH remote add origin $HOWARD_ABRAMS_VEEP_REPO && git -C $HOWARD_ABRAMS_VEEP_PATH fetch origin $HOWARD_ABRAMS_VEEP_VERSION && git -C $HOWARD_ABRAMS_VEEP_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
ARG DOOMEMACS_VERSION=42d5fd83504f8aa80f3248036006fbcd49222943
|
||||||
|
ARG DOOMEMACS_PATH=/foreign_documents/doomemacs
|
||||||
|
ARG DOOMEMACS_REPO=https://github.com/doomemacs/doomemacs.git
|
||||||
|
RUN mkdir -p $DOOMEMACS_PATH && git -C $DOOMEMACS_PATH init --initial-branch=main && git -C $DOOMEMACS_PATH remote add origin $DOOMEMACS_REPO && git -C $DOOMEMACS_PATH fetch origin $DOOMEMACS_VERSION && git -C $DOOMEMACS_PATH checkout FETCH_HEAD
|
||||||
|
|
||||||
|
|
||||||
|
FROM tester as foreign-document-test
|
||||||
|
RUN apk add --no-cache bash coreutils
|
||||||
|
RUN mkdir /foreign_documents
|
||||||
|
COPY --from=build-org-mode /root/org-mode /foreign_documents/org-mode
|
||||||
|
COPY --from=build-emacs /root/emacs /foreign_documents/emacs
|
||||||
|
COPY --from=foreign-document-gather /foreign_documents/howardabrams /foreign_documents/howardabrams
|
||||||
|
COPY --from=foreign-document-gather /foreign_documents/doomemacs /foreign_documents/doomemacs
|
||||||
|
COPY foreign_document_test_entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
@@ -6,7 +6,11 @@ all: build push
|
|||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
docker build -t $(IMAGE_NAME) -f Dockerfile ../
|
docker build -t $(IMAGE_NAME) -f Dockerfile --target tester .
|
||||||
|
|
||||||
|
.PHONY: build_foreign_document_test
|
||||||
|
build_foreign_document_test:
|
||||||
|
docker build -t $(IMAGE_NAME)-foreign-document -f Dockerfile --target foreign-document-test .
|
||||||
|
|
||||||
.PHONY: push
|
.PHONY: push
|
||||||
push:
|
push:
|
||||||
@@ -25,11 +29,16 @@ ifdef REMOTE_REPO
|
|||||||
else
|
else
|
||||||
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||||
endif
|
endif
|
||||||
|
docker volume rm rust-cache cargo-cache
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run: build
|
||||||
docker run --rm -i -t $(IMAGE_NAME)
|
docker run --rm --init --read-only --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source:ro" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target $(IMAGE_NAME) --no-default-features --features compare --no-fail-fast --lib --test test_loader
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell:
|
shell: build
|
||||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
docker run --rm -i -t --entrypoint /bin/sh --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source:ro" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target $(IMAGE_NAME)
|
||||||
|
|
||||||
|
.PHONY: run_foreign_document_test
|
||||||
|
run_foreign_document_test: build_foreign_document_test
|
||||||
|
docker run --rm --init --read-only --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source:ro" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target $(IMAGE_NAME)-foreign-document
|
||||||
|
|||||||
145
docker/organic_test/foreign_document_test_entrypoint.sh
Normal file
145
docker/organic_test/foreign_document_test_entrypoint.sh
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Run the Organic compare script against a series of documents sourced from exterior places.
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
REALPATH=$(command -v uu-realpath || command -v realpath)
|
||||||
|
|
||||||
|
function log {
|
||||||
|
(>&2 echo "${@}")
|
||||||
|
}
|
||||||
|
|
||||||
|
function die {
|
||||||
|
local status_code="$1"
|
||||||
|
shift
|
||||||
|
(>&2 echo "${@}")
|
||||||
|
exit "$status_code"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main {
|
||||||
|
cargo build --no-default-features --features compare --profile release-lto
|
||||||
|
if [ "${CARGO_TARGET_DIR:-}" = "" ]; then
|
||||||
|
CARGO_TARGET_DIR=$(realpath target/)
|
||||||
|
fi
|
||||||
|
PARSE="${CARGO_TARGET_DIR}/release-lto/parse"
|
||||||
|
|
||||||
|
local all_status=0
|
||||||
|
set +e
|
||||||
|
|
||||||
|
(run_compare_function "org-mode" compare_all_org_document "/foreign_documents/org-mode")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "emacs" compare_all_org_document "/foreign_documents/emacs")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "howard_abrams" compare_howard_abrams)
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "doomemacs" compare_all_org_document "/foreign_documents/doomemacs")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
if [ "$all_status" -ne 0 ]; then
|
||||||
|
echo "$(red_text "Some tests failed.")"
|
||||||
|
else
|
||||||
|
echo "$(green_text "All tests passed.")"
|
||||||
|
fi
|
||||||
|
return "$all_status"
|
||||||
|
}
|
||||||
|
|
||||||
|
function green_text {
|
||||||
|
(IFS=' '; printf '\x1b[38;2;0;255;0m%s\x1b[0m' "${*}")
|
||||||
|
}
|
||||||
|
|
||||||
|
function red_text {
|
||||||
|
(IFS=' '; printf '\x1b[38;2;255;0;0m%s\x1b[0m' "${*}")
|
||||||
|
}
|
||||||
|
|
||||||
|
function yellow_text {
|
||||||
|
(IFS=' '; printf '\x1b[38;2;255;255;0m%s\x1b[0m' "${*}")
|
||||||
|
}
|
||||||
|
|
||||||
|
function indent {
|
||||||
|
local depth="$1"
|
||||||
|
local scaled_depth=$((depth * 2))
|
||||||
|
shift 1
|
||||||
|
local prefix=$(printf -- "%${scaled_depth}s")
|
||||||
|
while read l; do
|
||||||
|
(IFS=' '; printf -- '%s%s\n' "$prefix" "$l")
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_compare_function {
|
||||||
|
local name="$1"
|
||||||
|
local stdoutput
|
||||||
|
shift 1
|
||||||
|
set +e
|
||||||
|
stdoutput=$("${@}")
|
||||||
|
local status=$?
|
||||||
|
set -e
|
||||||
|
if [ "$status" -eq 0 ]; then
|
||||||
|
echo "$(green_text "GOOD") $name"
|
||||||
|
indent 1 <<<"$stdoutput"
|
||||||
|
else
|
||||||
|
echo "$(red_text "FAIL") $name"
|
||||||
|
indent 1 <<<"$stdoutput"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function compare_all_org_document {
|
||||||
|
local root_dir="$1"
|
||||||
|
local target_document
|
||||||
|
local all_status=0
|
||||||
|
while read target_document; do
|
||||||
|
local relative_path=$($REALPATH --relative-to "$root_dir" "$target_document")
|
||||||
|
set +e
|
||||||
|
(run_compare "$relative_path" "$target_document")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
set -e
|
||||||
|
done<<<$(find "$root_dir" -type f -iname '*.org')
|
||||||
|
return "$all_status"
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_compare {
|
||||||
|
local name="$1"
|
||||||
|
local target_document="$2"
|
||||||
|
set +e
|
||||||
|
($PARSE "$target_document" &> /dev/null)
|
||||||
|
local status=$?
|
||||||
|
set -e
|
||||||
|
if [ "$status" -eq 0 ]; then
|
||||||
|
echo "$(green_text "GOOD") $name"
|
||||||
|
else
|
||||||
|
echo "$(red_text "FAIL") $name"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function compare_howard_abrams {
|
||||||
|
local all_status=0
|
||||||
|
set +e
|
||||||
|
|
||||||
|
(run_compare_function "dot-files" compare_all_org_document "/foreign_documents/howardabrams/dot-files")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "hamacs" compare_all_org_document "/foreign_documents/howardabrams/hamacs")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "demo-it" compare_all_org_document "/foreign_documents/howardabrams/demo-it")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "magit-demo" compare_all_org_document "/foreign_documents/howardabrams/magit-demo")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "pdx-emacs-hackers" compare_all_org_document "/foreign_documents/howardabrams/pdx-emacs-hackers")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "flora-simulator" compare_all_org_document "/foreign_documents/howardabrams/flora-simulator")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "literate-devops-demo" compare_all_org_document "/foreign_documents/howardabrams/literate-devops-demo")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "clojure-yesql-xp" compare_all_org_document "/foreign_documents/howardabrams/clojure-yesql-xp")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
(run_compare_function "veep" compare_all_org_document "/foreign_documents/howardabrams/veep")
|
||||||
|
if [ "$?" -ne 0 ]; then all_status=1; fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
return "$all_status"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
1
elisp_snippets/README.md
Normal file
1
elisp_snippets/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This folder is for snippets of elisp that are useful for development.
|
||||||
3
elisp_snippets/dump_org_element_affiliated_keywords.el
Normal file
3
elisp_snippets/dump_org_element_affiliated_keywords.el
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(dolist (var org-element-affiliated-keywords)
|
||||||
|
(message "\"%s\"," (downcase var))
|
||||||
|
)
|
||||||
5
elisp_snippets/dump_org_entities.el
Normal file
5
elisp_snippets/dump_org_entities.el
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
(dolist (var org-entities)
|
||||||
|
(when (listp var)
|
||||||
|
(message "\"%s\"," (nth 0 var))
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
* Test 1
|
|
||||||
** Source
|
|
||||||
#+begin_src org
|
|
||||||
1. foo
|
|
||||||
|
|
||||||
1. bar
|
|
||||||
|
|
||||||
2. baz
|
|
||||||
|
|
||||||
2. lorem
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
#+end_src
|
|
||||||
** Ownership
|
|
||||||
This table is just showing ownership for the plain list items, not the containing plain list nor the elements inside each item.
|
|
||||||
|
|
||||||
| Plain List *Item* | Owns trailing blank lines |
|
|
||||||
|------------------------+---------------------------|
|
|
||||||
| foo (includes bar baz) | Yes |
|
|
||||||
| bar | Yes |
|
|
||||||
| baz | Yes |
|
|
||||||
| lorem | No |
|
|
||||||
** Analysis
|
|
||||||
This seems to imply that plain list items own their trailing blank lines except for the final plain list item in the top-most plain list which does not own its trailing blank lines.
|
|
||||||
* Test 2
|
|
||||||
** Source
|
|
||||||
#+begin_src org
|
|
||||||
1. foo
|
|
||||||
|
|
||||||
bar
|
|
||||||
|
|
||||||
1. baz
|
|
||||||
|
|
||||||
lorem
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
|
|
||||||
|
|
||||||
dolar
|
|
||||||
#+end_src
|
|
||||||
** Ownership
|
|
||||||
This table is just showing ownership for the plain list items, not the containing plain list nor the elements inside each item.
|
|
||||||
|
|
||||||
| Plain List *Item* | Owns trailing blank lines |
|
|
||||||
|--------------------------+---------------------------|
|
|
||||||
| foo -> ipsum (inclusive) | No |
|
|
||||||
| baz lorem | No |
|
|
||||||
** Analysis
|
|
||||||
This shows that the final plain list item in a nested plain list (baz lorem) does not own its trailing blank lines which conflicts with "baz" from Test 1.
|
|
||||||
* Test 3
|
|
||||||
** Source
|
|
||||||
#+begin_src org
|
|
||||||
1. foo
|
|
||||||
|
|
||||||
1. bar
|
|
||||||
|
|
||||||
baz
|
|
||||||
|
|
||||||
2. lorem
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
#+end_src
|
|
||||||
** Ownership
|
|
||||||
| Plain List *Item* | Owns trailing blank lines |
|
|
||||||
|------------------------+---------------------------|
|
|
||||||
| foo (includes bar baz) | Yes |
|
|
||||||
| bar baz | Yes |
|
|
||||||
| lorem | No |
|
|
||||||
** Analysis
|
|
||||||
This was to test if having an extra paragraph in the final list item in the nested list changes the behavior. The behavior is consistent with Test 1, so the extra paragraph is not the cause of the discrepancy.
|
|
||||||
* Test 4
|
|
||||||
** Source
|
|
||||||
#+begin_src org
|
|
||||||
1. foo
|
|
||||||
|
|
||||||
1. bar
|
|
||||||
|
|
||||||
2. baz
|
|
||||||
|
|
||||||
candy
|
|
||||||
|
|
||||||
2. lorem
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
#+end_src
|
|
||||||
** Ownership
|
|
||||||
| Plain List *Item* | Owns trailing blank lines |
|
|
||||||
|----------------------------------+---------------------------|
|
|
||||||
| foo (includes bar baz and candy) | Yes |
|
|
||||||
| bar | Yes |
|
|
||||||
| baz | No |
|
|
||||||
| lorem | No |
|
|
||||||
** Analysis
|
|
||||||
This was to test if putting a non-plain-list element at the end of foo changes the ownership of blank lines. baz changed to no longer owning its trailing whitespace.
|
|
||||||
|
|
||||||
This seems to imply that list items own their trailing whitespace except for the final item unless that list item is at the end of a list item.
|
|
||||||
* Test 5
|
|
||||||
** Source
|
|
||||||
#+begin_src org
|
|
||||||
1. foo
|
|
||||||
|
|
||||||
1. bar
|
|
||||||
|
|
||||||
2. baz
|
|
||||||
|
|
||||||
candy
|
|
||||||
|
|
||||||
2. lorem
|
|
||||||
|
|
||||||
1. cat
|
|
||||||
|
|
||||||
2. dog
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
#+end_src
|
|
||||||
** Ownership
|
|
||||||
| Plain List *Item* | Owns trailing blank lines |
|
|
||||||
|----------------------------------+---------------------------|
|
|
||||||
| foo (includes bar baz and candy) | Yes |
|
|
||||||
| bar | Yes |
|
|
||||||
| baz | No |
|
|
||||||
| lorem (includes cat and dog) | No |
|
|
||||||
| cat | Yes |
|
|
||||||
| dog | No |
|
|
||||||
** Analysis
|
|
||||||
This breaks the theory that the final list item nested at the end of a list item gets to own its trailing blank lines since dog does not own its blank lines despite Test 1's baz owning its blank lines.
|
|
||||||
|
|
||||||
New Theory: final list items only own their blank lines if they are nested at the end of a non-final list item.
|
|
||||||
1
org_mode_samples/README.org
Normal file
1
org_mode_samples/README.org
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This folder contains org-mode documents that get automatically included as tests using build.rs.
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
1. foo
|
1. plain-list
|
||||||
#+begin_center
|
#+begin_center
|
||||||
|
|
||||||
|
|
||||||
#+end_center
|
#+end_center
|
||||||
2. bar
|
|
||||||
|
Is this still in the plain list?
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
This folder is an investigation into whether or not my exit matchers should operate from the top down or bottom up.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
foo *bar baz * lorem* ipsum
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Looks like 2 blank lines always exits the top-level plain list.
|
|
||||||
|
|
||||||
Plain lists do not seem to go inside paragraphs but rather exist beside them.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
1. foo
|
|
||||||
|
|
||||||
bar
|
|
||||||
|
|
||||||
1. baz
|
|
||||||
|
|
||||||
lorem
|
|
||||||
|
|
||||||
ipsum
|
|
||||||
|
|
||||||
|
|
||||||
dolar
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Looks like table cells cannot contain lists but can contain bolds
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
ip *su* m
|
|
||||||
|
|
||||||
| foo | bar |
|
|
||||||
|----------+-----|
|
|
||||||
| 1. lo *re* m | |
|
|
||||||
25
org_mode_samples/greater_element/dynamic_block/simple.org
Normal file
25
org_mode_samples/greater_element/dynamic_block/simple.org
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#+BEGIN: clocktable :scope file :maxlevel 2
|
||||||
|
#+CAPTION: Clock summary at [2023-08-25 Fri 05:34]
|
||||||
|
| Headline | Time |
|
||||||
|
|--------------+--------|
|
||||||
|
| *Total time* | *0:00* |
|
||||||
|
#+END:
|
||||||
|
|
||||||
|
#+BEGIN: columnview :hlines 1 :id global
|
||||||
|
| ITEM | TODO | PRIORITY | TAGS |
|
||||||
|
|-------+------+----------+------------------------------|
|
||||||
|
| Foo | | B | |
|
||||||
|
|-------+------+----------+------------------------------|
|
||||||
|
| Bar | TODO | B | |
|
||||||
|
|-------+------+----------+------------------------------|
|
||||||
|
| Baz | | B | :thisisatag: |
|
||||||
|
| Lorem | | B | :thisshouldinheritfromabove: |
|
||||||
|
| Ipsum | | B | :multiple:tags: |
|
||||||
|
#+END:
|
||||||
|
* Foo
|
||||||
|
* TODO Bar
|
||||||
|
* Baz :thisisatag:
|
||||||
|
** Lorem :thisshouldinheritfromabove:
|
||||||
|
*** Ipsum :multiple:tags:
|
||||||
|
* Dolar ::
|
||||||
|
* cat :dog: bat
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
* Footnotes
|
||||||
|
|
||||||
|
[fn:1]
|
||||||
|
|
||||||
|
#+BEGIN_EXAMPLE
|
||||||
|
baz
|
||||||
|
#+END_EXAMPLE
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#+begin_defun
|
||||||
|
foo
|
||||||
|
#+begin_lorem
|
||||||
|
,#+begin_center
|
||||||
|
bar
|
||||||
|
,#+end_center
|
||||||
|
ipsum
|
||||||
|
#+end_lorem
|
||||||
|
baz
|
||||||
|
#+end_defun
|
||||||
|
|
||||||
|
#+begin_center
|
||||||
|
#+begin_quote
|
||||||
|
#+begin_center
|
||||||
|
lorem
|
||||||
|
#+end_center
|
||||||
|
#+end_quote
|
||||||
|
#+end_center
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#+begin_defun
|
||||||
|
foo
|
||||||
|
#+begin_lorem
|
||||||
|
ipsum
|
||||||
|
#+end_lorem
|
||||||
|
bar
|
||||||
|
#+begin_center
|
||||||
|
#+begin_quote
|
||||||
|
baz
|
||||||
|
#+end_quote
|
||||||
|
#+end_center
|
||||||
|
#+end_defun
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#+begin_defun
|
||||||
|
foo
|
||||||
|
|
||||||
|
{{{bar(baz)}}}
|
||||||
|
#+end_defun
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
1. foo
|
||||||
|
2.
|
||||||
|
bar
|
||||||
|
1.
|
||||||
|
#+begin_center
|
||||||
|
Still in the list
|
||||||
|
#+end_center
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
3. [@3] foo
|
||||||
|
4. bar
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
- foo ::
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
- foo :: bar
|
||||||
|
- cat ::
|
||||||
|
dog
|
||||||
|
- lorem
|
||||||
|
:: ipsum
|
||||||
|
-
|
||||||
|
lorem :: ipsum
|
||||||
|
- dolar *bold* foo :: ipsum
|
||||||
|
- big gap ::
|
||||||
|
|
||||||
|
stuff
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
- {{{foo(bar)}}} :: baz
|
||||||
|
- =foo= :: bar
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
- foo :: bar
|
||||||
|
- foo :: bar
|
||||||
|
- foo :: bar
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
- =foo :: bar= :: baz
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
* headline
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
- foo
|
||||||
|
|
||||||
@@ -6,6 +6,4 @@
|
|||||||
|
|
||||||
2. lorem
|
2. lorem
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ipsum
|
ipsum
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
1. foo
|
||||||
|
|
||||||
|
1. bar
|
||||||
|
|
||||||
|
2. baz
|
||||||
|
|
||||||
|
cat
|
||||||
|
|
||||||
|
2. lorem
|
||||||
|
|
||||||
|
ipsum
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
1. cat
|
||||||
|
1. foo
|
||||||
|
|
||||||
|
1. bar
|
||||||
|
|
||||||
|
2. baz
|
||||||
|
|
||||||
|
2. lorem
|
||||||
|
|
||||||
|
ipsum
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
1. cat
|
||||||
|
1. foo
|
||||||
|
|
||||||
|
1. bar
|
||||||
|
|
||||||
|
2. baz
|
||||||
|
|
||||||
|
2. lorem
|
||||||
|
|
||||||
|
2. dog
|
||||||
|
|
||||||
|
ipsum
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
* Overwrite
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :var foo="lorem"
|
||||||
|
:header-args:emacs-lisp: :var bar="ipsum"
|
||||||
|
:header-args:emacs-lisp+: :results silent :var baz=7
|
||||||
|
:END:
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
** foo
|
||||||
|
:PROPERTIES:
|
||||||
|
:DESCRIPTION: lorem
|
||||||
|
:ALT_TITLE: ipsum
|
||||||
|
:END:
|
||||||
|
|
||||||
|
bar
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
src_elisp{(bar)}
|
||||||
|
*src_elisp{(bar)}*
|
||||||
|
|
||||||
|
| foo *bar* |
|
||||||
|
| foo src_elisp{(bar)} |
|
||||||
|
| foo *src_elisp{(bar)}* |
|
||||||
8
org_mode_samples/greater_element/table/with_formulas.org
Normal file
8
org_mode_samples/greater_element/table/with_formulas.org
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
| Name | Price | Quantity | Total |
|
||||||
|
|------+-------+----------+-------|
|
||||||
|
| foo | 7 | 4 | 28 |
|
||||||
|
| bar | 3.5 | 3 | 10.5 |
|
||||||
|
|------+-------+----------+-------|
|
||||||
|
| | | 7 | 38.5 |
|
||||||
|
#+tblfm: $4=$2*$3::@>$4=vsum(@2..@-1)
|
||||||
|
#+tblfm: @>$3=vsum(@2..@-1)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
%%(foo bar) ; baz
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# This test is to prove that the parser works with affiliated keywords that have both a shorter and longer version.
|
||||||
|
|
||||||
|
#+results:
|
||||||
|
#+result:
|
||||||
|
#+begin_latex
|
||||||
|
\foo
|
||||||
|
#+end_latex
|
||||||
1
org_mode_samples/lesser_element/keyword/babel_call.org
Normal file
1
org_mode_samples/lesser_element/keyword/babel_call.org
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#+call: foo(bar="baz")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#+name: foo
|
||||||
|
#+caption: bar
|
||||||
|
#+caption: baz
|
||||||
|
|
||||||
|
[[file:lorem/ipsum.png]]
|
||||||
|
|
||||||
|
#+name: cat
|
||||||
|
#+foo: dog
|
||||||
|
[[file:lorem/ipsum.png]]
|
||||||
|
|
||||||
|
#+name: cat
|
||||||
|
#+foo: dog
|
||||||
|
|
||||||
|
|
||||||
|
foo
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#+title:foo:bar: baz: lorem: ipsum
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#+begin_src
|
||||||
|
#+end_src
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# There are trailing spaces after the begin and end src lines
|
||||||
|
#+begin_src
|
||||||
|
echo "this is a source block."
|
||||||
|
#+end_src
|
||||||
22
org_mode_samples/object/citation/balanced_brackets.org
Normal file
22
org_mode_samples/object/citation/balanced_brackets.org
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Extra open
|
||||||
|
[cite/a/b-_/foo:unbalancedglobal[prefix;keyprefix @foo keysuffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;unbalancedkey[prefix @foo keysuffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;keyprefix @foo unbalancedkey[suffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;keyprefix @foo keysuffix;unbalancedglobal[suffix]
|
||||||
|
|
||||||
|
|
||||||
|
# Extra close
|
||||||
|
[cite/a/b-_/foo:unbalancedglobal]prefix;keyprefix @foo keysuffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;unbalancedkey]prefix @foo keysuffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;keyprefix @foo unbalancedkey]suffix;globalsuffix]
|
||||||
|
|
||||||
|
[cite/a/b-_/foo:globalprefix;keyprefix @foo keysuffix;unbalancedglobal]suffix]
|
||||||
|
|
||||||
|
|
||||||
|
# balanced:
|
||||||
|
[cite/a/b-_/foo:gl[obalpref]ix;ke[ypref]ix @foo ke[ysuff]ix;gl[obalsuff]ix]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[fn:2:This footnote [ has balanced ] brackets inside it]
|
||||||
|
[fn::This footnote does not have balanced [ brackets inside it]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
*[fn:: /abcdef[fn::ghijklmnopqrstuvw]xyz/ r]*
|
||||||
|
|
||||||
|
*[fn:: /abcdef[fn::ghijk *lmnopq* rstuvw]xyz/ r]*
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user