Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions backend/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<PackageVersion Include="icu.net" Version="3.0.1" />
<PackageVersion Include="linq2db.Extensions" Version="6.3.0" />
<PackageVersion Include="linq2db.EntityFrameworkCore" Version="10.4.0" />
<PackageVersion Include="L10NSharp" Version="10.0.0-beta0012" />
<PackageVersion Include="L10NSharp.Windows.Forms" Version="10.0.0-beta0012" />
<PackageVersion Include="L10NSharp" Version="10.0.0-beta0014" />
<PackageVersion Include="L10NSharp.Windows.Forms" Version="10.0.0-beta0014" />
<PackageVersion Include="MailKit" Version="4.16.0" />
<PackageVersion Include="Meziantou.Extensions.Logging.Xunit" Version="2.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.8" />
Expand Down Expand Up @@ -105,17 +105,17 @@
<PackageVersion Include="Reinforced.Typings" Version="1.6.7" />
<PackageVersion Include="Scalar.AspNetCore" Version="2.14.11" />
<PackageVersion Include="SharpCompress" Version="0.49.1" />
<PackageVersion Include="SIL.Chorus.ChorusMerge" Version="6.0.0-beta0064" />
<PackageVersion Include="SIL.Chorus.LibChorus" Version="6.0.0-beta0064" />
<PackageVersion Include="SIL.Chorus.ChorusMerge" Version="6.0.0-beta0074" />
<PackageVersion Include="SIL.Chorus.LibChorus" Version="6.0.0-beta0074" />
<PackageVersion Include="SIL.Chorus.Mercurial" Version="6.5.1.43" />
<PackageVersion Include="SIL.ChorusPlugin.LfMergeBridge" Version="4.3.0-beta0048" />
<PackageVersion Include="SIL.Harmony" Version="0.2.1-rc.241" />
<PackageVersion Include="SIL.Harmony.Core" Version="0.2.1-rc.241" />
<PackageVersion Include="SIL.Harmony.Linq2db" Version="0.2.1-rc.241" />
<PackageVersion Include="SIL.Core" Version="17.0.0" />
<PackageVersion Include="SIL.Core" Version="18.0.0-beta0032" />
<PackageVersion Include="SIL.LCModel" Version="11.0.0-beta0165" />
<PackageVersion Include="SIL.LCModel.FixData" Version="11.0.0-beta0165" />
<PackageVersion Include="SIL.WritingSystems" Version="17.0.0" />
<PackageVersion Include="SIL.WritingSystems" Version="18.0.0-beta0032" />
<!-- Only included so it can be excluded. See FwLiteMaui.csproj. -->
<PackageVersion Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
<PackageVersion Include="Soenneker.Utils.AutoBogus" Version="4.0.895" />
Expand Down
3 changes: 3 additions & 0 deletions backend/FwHeadless/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ RUN test -f FixFwData \
&& python3 -c "import zipfile; open('/tmp/smoke.fwdata','wb').write(zipfile.ZipFile('/tmp/test-template-repo.zip').read('kevin-test-01.fwdata'))" \
&& ./FixFwData /tmp/smoke.fwdata; ec=$?; rm -f /tmp/test-template-repo.zip /tmp/smoke.fwdata; \
if [ $ec -gt 1 ]; then echo "FixFwData smoke test failed with exit $ec"; exit 1; fi
# Fail loudly if ChorusMerge finds no *-ChorusPlugin.dll (sillsdev/chorus#393 / #392); must be set
# before the chorusmerge smoke-test RUN below.
ENV ChorusRequirePlugins=1
# Smoke-test: chorusmerge must engage the FieldWorks merge handler, not silently keep one
# whole file (#2508). Runs the real wrapper from a non-/app cwd, exactly as hg does.
# Bind-mount rather than COPY so the fixture/script don't ship in the runtime image.
Expand Down
10 changes: 3 additions & 7 deletions backend/FwHeadless/chorusmerge
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/bin/bash

# cwd while running script is inside the hg repo. ChorusMerge finds its FieldWorks merge
# handlers by scanning the cwd for *-ChorusPlugin.dll (MEF DirectoryCatalog(".")), so cd to
# where they sit next to ChorusMerge.dll, else merges silently fall back to "keep ours".
# hg passes absolute file paths to the merge tool, so changing cwd is safe.
# cwd while running script is inside the hg repo. ChorusMerge (SIL.Chorus >= 6.0.0-beta0074)
# discovers *-ChorusPlugin.dll from AppContext.BaseDirectory (sillsdev/chorus#393), so plugins
# are found even when hg's cwd is the repo. Resolve ChorusMerge.dll next to this script.
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
# Fail loudly rather than merge from the wrong cwd: a merge without the handlers silently
# keeps "ours" (the #2508 data loss); a non-zero exit makes Chorus roll back and throw.
cd "$SCRIPT_DIR" || { echo "chorusmerge: cannot cd to $SCRIPT_DIR; refusing to merge without the FieldWorks handlers" >&2; exit 1; }

exec dotnet "${SCRIPT_DIR}/ChorusMerge.dll" "$@"
6 changes: 3 additions & 3 deletions backend/FwHeadless/chorusmerge-smoke/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# PartsOfSpeech.base.list is the FLExBridge split (nested) form of a possibility list — what
# hg actually versions and merges. Regenerate from a .fwdata with the FLExBridge split CLI.
#
# The handler is discovered by scanning the *current working directory* for *-ChorusPlugin.dll,
# and hg runs the merge tool with cwd = the repo (not /app). So this MUST run from a non-/app
# cwd to be meaningful — running it from /app would hide the bug and pass falsely.
# Plugins are discovered from AppContext.BaseDirectory (sillsdev/chorus#393), but hg still runs
# the merge tool with cwd = the repo (not /app). Run from a non-/app cwd so we keep exercising
# that path — ChorusRequirePlugins=1 (FwHeadless Dockerfile ENV) fails if none load.
set -euo pipefail

APP=${APP:-/app}
Expand Down
Loading