• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sile-typesetter / sile / 6713098919

31 Oct 2023 10:21PM UTC coverage: 52.831% (-21.8%) from 74.636%
6713098919

push

github

web-flow
Merge d0a2a1ee9 into b185d4972

45 of 45 new or added lines in 3 files covered. (100.0%)

8173 of 15470 relevant lines covered (52.83%)

6562.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

44.23
/core/deprecations.lua
1
local nostd = function ()
2
  SU.deprecated("std.object", "pl.class", "0.13.0", "0.14.0", [[
×
3
  Lua stdlib (std.*) is no longer provided by SILE, you may use
4
      local std = require("std")
5
  in your project directly if needed. Note you may need to install the Lua
6
  rock as well since it no longer ships as a dependency.]])
×
7
end
8
-- luacheck: push ignore std
9
---@diagnostic disable: lowercase-global
10
std = setmetatable({}, {
692✔
11
  __call = nostd,
346✔
12
  __index = nostd
346✔
13
})
346✔
14
-- luacheck: pop
15
---@diagnostic enable: lowercase-global
16

17
local fluent_once = false
346✔
18
local fluentglobal = function ()
19
  if fluent_once then return end
×
20
  SU.deprecated("SILE.fluent", "fluent", "0.14.0", "0.15.0", [[
×
21
  The SILE.fluent object was never more than just an instance of a
22
  third party library with no relation the scope of the SILE object.
23
  This was even confusing me and marking it awkward to work on
24
  SILE-as-a-library. Making it a provided global clarifies whot it
25
  is and is not. Maybe someday we'll actually make a wrapper that
26
  tracks the state of the document language.]])
×
27
  fluent_once = true
×
28
end
29
SILE.fluent = setmetatable({}, {
692✔
30
  __call = function (_, ...)
31
    fluentglobal()
×
32
    SILE.fluent = fluent
×
33
    return fluent(table.unpack({...}, 1, select("#", ...)))
×
34
  end,
35
  __index = function (_, key)
36
    fluentglobal()
×
37
    SILE.fluent = fluent
×
38
    return fluent[key]
×
39
  end
40
})
346✔
41

42
local nobaseclass = function ()
43
  SU.deprecated("SILE.baseclass", "SILE.classes.base", "0.13.0", "0.14.0", [[
×
44
  The inheritance system for SILE classes has been refactored using a different
45
  object model.]])
×
46
end
47
SILE.baseClass = setmetatable({}, {
692✔
48
    __call = nobaseclass,
346✔
49
    __index = nobaseclass
346✔
50
  })
346✔
51

52
SILE.defaultTypesetter = function (frame)
346✔
53
  SU.deprecated("SILE.defaultTypesetter", "SILE.typesetters.base", "0.14.6", "0.15.0")
×
54
  return SILE.typesetters.base(frame)
×
55
end
56

57
SILE.toPoints = function (_, _)
346✔
58
  SU.deprecated("SILE.toPoints", "SILE.measurement():tonumber", "0.10.0", "0.13.1")
×
59
end
60

61
SILE.toMeasurement = function (_, _)
346✔
62
  SU.deprecated("SILE.toMeasurement", "SILE.measurement", "0.10.0", "0.13.1")
×
63
end
64

65
SILE.toAbsoluteMeasurement = function (_, _)
346✔
66
  SU.deprecated("SILE.toAbsoluteMeasurement", "SILE.measurement():absolute", "0.10.0", "0.13.1")
×
67
end
68

69
SILE.readFile = function (filename)
346✔
70
  SU.deprecated("SILE.readFile", "SILE.processFile", "0.14.0", "0.16.0")
×
71
  return SILE.processFile(filename)
×
72
end
73

74
SILE.colorparser = function (input)
346✔
75
  SU.deprecated("SILE.colorparser", "SILE.color", "0.14.0", "0.16.0",
×
76
    [[Color results are now color objects, not just tables with relevant values.]])
×
77
  return SILE.color(input)
×
78
end
79

80
function SILE.doTexlike (doc)
692✔
81
  SU.deprecated("SILE.doTexlike", "SILE.processString", "0.14.0", "0.16.0",
×
82
    [[Add format argument "sil" to skip content detection and assume SIL input]])
×
83
  return SILE.processString(doc, "sil")
×
84
end
85

86
local nopackagemanager = function ()
87
  SU.deprecated("SILE.PackageManager", nil, "0.13.2", "0.15.0", [[
×
88
  The built in SILE package manager has been completely deprecated. In its place
89
    SILE can now load classes, packages, and other resources installed via
90
    LuaRocks. Any SILE package may be published on LuaRocks.org or any private
91
    repository. Rocks may be installed to the host system root filesystem, a user
92
    directory, or a custom location. Please see the SILE manual for usage
93
    instructions. Package authors especially can review the template repository
94
    on GitHub for how to create a package.
95
  ]])
×
96
end
97

98
SILE.PackageManager = {}
346✔
99
setmetatable(SILE.PackageManager, {
692✔
100
  __index = nopackagemanager
346✔
101
})
102

103
-- luacheck: ignore updatePackage
104
-- luacheck: ignore installPackage
105
updatePackage = nopackagemanager
346✔
106
installPackage = nopackagemanager
346✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc