eolang 0.33.5 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Formula/eolang.rb CHANGED
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.4.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.33.1"
12
- sha256 "68e7583958c2de456c858fbb9d79aed602a89b17b2012d206af863d039bf8e0b"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.4.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.32.0"
12
- sha256 "68e7583958c2de456c858fbb9d79aed602a89b17b2012d206af863d039bf8e0b"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.4.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.32.1"
12
- sha256 "68e7583958c2de456c858fbb9d79aed602a89b17b2012d206af863d039bf8e0b"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
@@ -7,9 +7,9 @@ require "language/node"
7
7
  class Eolang < Formula
8
8
  desc "Command-line Tool-Kit"
9
9
  homepage "https://github.com/objectionary/eoc"
10
- url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.4.tar.gz"
10
+ url "https://github.com/objectionary/eoc/archive/refs/tags/0.33.5.tar.gz"
11
11
  version "0.33.0"
12
- sha256 "68e7583958c2de456c858fbb9d79aed602a89b17b2012d206af863d039bf8e0b"
12
+ sha256 "f2a88bad46caa6a67d9058e8e7add2ff05f26959b08b3151c13f9178aab7e6a9"
13
13
  license "MIT"
14
14
 
15
15
  depends_on "node"
package/README.md CHANGED
@@ -19,14 +19,14 @@ First, you install [npm][npm-install] and [Java SE][java-se].
19
19
  Then, you install [eolang][npm] package, using [npm][npm-install]:
20
20
 
21
21
  ```bash
22
- npm install -g eolang@0.33.3
22
+ npm install -g eolang@0.33.5
23
23
  ```
24
24
 
25
25
  You can also use [Homebrew] (on macOS):
26
26
 
27
27
  ```bash
28
28
  brew tap objectionary/eoc https://github.com/objectionary/eoc
29
- brew install objectionary/eoc/eolang@0.33.3
29
+ brew install objectionary/eoc/eolang@0.33.5
30
30
  ```
31
31
 
32
32
  Or install it via [Nix flakes](https://nixos.wiki/wiki/Flakes):
@@ -147,6 +147,11 @@ There are also commands that help manipulate with XMIR and EO sources
147
147
  This command line toolkit simply integrates other tools available in
148
148
  the [@objectionary](https://github.com/objectionary) GitHub organization.
149
149
 
150
+ ## Linting
151
+
152
+ There are two ways to work with linting. The `--easy` option enables linting
153
+ but ignores warnings, while the `--blind` option completely disables linting.
154
+
150
155
  ## How to Test
151
156
 
152
157
  To execute the project tests, use the following command:
@@ -162,7 +162,7 @@
162
162
  <dependency>
163
163
  <groupId>org.junit.jupiter</groupId>
164
164
  <artifactId>junit-jupiter-api</artifactId>
165
- <version>6.0.2</version>
165
+ <version>6.0.3</version>
166
166
  <scope>test</scope>
167
167
  <exclusions>
168
168
  <exclusion>
@@ -186,7 +186,7 @@
186
186
  <dependency>
187
187
  <groupId>org.junit.jupiter</groupId>
188
188
  <artifactId>junit-jupiter-engine</artifactId>
189
- <version>6.0.2</version>
189
+ <version>6.0.3</version>
190
190
  <scope>test</scope>
191
191
  <exclusions>
192
192
  <exclusion>
@@ -210,7 +210,7 @@
210
210
  <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
211
211
  <heap-size>undefined</heap-size>
212
212
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
213
- <junit.version>6.0.2</junit.version>
213
+ <junit.version>6.0.3</junit.version>
214
214
  <jeo.version>0.15.0</jeo.version>
215
215
  </properties>
216
216
  </project>
package/mvnw/pom.xml CHANGED
@@ -16,7 +16,7 @@
16
16
  <eo.version>undefined</eo.version>
17
17
  <heap-size>undefined</heap-size>
18
18
  <stack-size>undefined</stack-size>
19
- <junit.version>6.0.2</junit.version>
19
+ <junit.version>6.0.3</junit.version>
20
20
  </properties>
21
21
  <dependencies>
22
22
  <dependency>
package/package.json CHANGED
@@ -72,7 +72,7 @@
72
72
  "scripts": {
73
73
  "coverage": "nyc --reporter=lcov --reporter=text-summary mocha test/**/*.js --timeout 1200000",
74
74
  "postinstall": "node scripts/postinstall.js",
75
- "test": "mocha test/**/*.js --timeout 1200000"
75
+ "test": "mocha 'test/**/*.js' --timeout 1200000"
76
76
  },
77
- "version": "0.33.5"
77
+ "version": "0.34.0"
78
78
  }
@@ -17,7 +17,6 @@ const semver = require('semver');
17
17
  module.exports = function(opts) {
18
18
  const extra = [
19
19
  `-Deo.failOnWarning=${opts.easy ? 'false' : 'true'}`,
20
- `-Deo.skipLinting=${opts.blind ? 'true' : 'false'}`,
21
20
  ];
22
21
  return elapsed(async (tracked) => {
23
22
  if (opts.parser.endsWith('-SNAPSHOT') || semver.gte(opts.parser, '0.45.0')) {
package/src/eoc.js CHANGED
@@ -94,7 +94,7 @@ program
94
94
  .option('-s, --sources <path>', 'Directory with .EO sources', '.')
95
95
  .option('-t, --target <path>', 'Directory with all generated files', '.eoc')
96
96
  .option('--easy', 'Ignore "warnings" and only fail if there are "errors" or "critical" errors')
97
- .option('--blind', 'Ignore "warnings," "errors," and "critical" errors')
97
+ .option('--blind', 'Disable linting')
98
98
  .option('--home-tag <version>', 'Git tag in objectionary/home to compile against', tag)
99
99
  .option('--parser <version>', 'Set the version of EO parser to use', parser)
100
100
  .option('--latest', 'Use the latest parser version from Maven Central')
@@ -105,7 +105,8 @@ program
105
105
  .option('--track-transformation-steps', 'Save intermediate XMIR files')
106
106
  .option('-c, --clean', 'Delete .eoc directory before running a command')
107
107
  .option('--debug', 'Print ALL debug messages, heavily overloading the log')
108
- .option('--verbose', 'Print debug messages and full output of child processes');
108
+ .option('--verbose', 'Print debug messages and full output of child processes')
109
+ .option('--pin <version>', 'Fail if eoc version doesn\'t match exactly', version.what);
109
110
 
110
111
  program.command('audit')
111
112
  .description('Inspect all packages and report their status')
@@ -124,18 +125,21 @@ program
124
125
  .option('--global', 'delete ~/.eo directory')
125
126
  .description('Delete all temporary files')
126
127
  .action((str, opts) => {
128
+ pin(program.opts());
127
129
  coms().clean({...program.opts(), ...str});
128
130
  });
129
131
 
130
132
  program.command('register')
131
133
  .description('Register all visible EO source files')
132
134
  .action((str, opts) => {
135
+ pin(program.opts());
133
136
  coms().register(program.opts());
134
137
  });
135
138
 
136
139
  program.command('parse')
137
140
  .description('Parse EO files into XMIR')
138
141
  .action(async (str, opts) => {
142
+ pin(program.opts());
139
143
  clear(str);
140
144
  if (program.opts().alone === undefined) {
141
145
  await coms().register(program.opts());
@@ -148,6 +152,7 @@ program.command('parse')
148
152
  program.command('assemble')
149
153
  .description('Parse EO files into XMIR and join them with required dependencies')
150
154
  .action(async (str, opts) => {
155
+ pin(program.opts());
151
156
  clear(str);
152
157
  if (program.opts().alone === undefined) {
153
158
  await coms().register(program.opts());
@@ -166,6 +171,7 @@ program.command('sodg')
166
171
  .option('--include <names>', 'Generate SODG for these object names (using mask)', '**')
167
172
  .option('--exclude <names>', 'Don\'t generate SODG for these objects')
168
173
  .action(async (str, opts) => {
174
+ pin(program.opts());
169
175
  clear(str);
170
176
  if (program.opts().alone === undefined) {
171
177
  await coms().register(program.opts());
@@ -189,6 +195,7 @@ program.command('print')
189
195
  'print'
190
196
  )
191
197
  .action((str, opts) => {
198
+ pin(program.opts());
192
199
  clear(str);
193
200
  coms().print({...program.opts(), ...str});
194
201
  });
@@ -196,6 +203,7 @@ program.command('print')
196
203
  program.command('lint')
197
204
  .description('Lint XMIR files and fail if any issues inside')
198
205
  .action(async (str, opts) => {
206
+ pin(program.opts());
199
207
  clear(str);
200
208
  if (program.opts().alone === undefined) {
201
209
  await coms().register(program.opts());
@@ -209,6 +217,7 @@ program.command('lint')
209
217
  program.command('resolve')
210
218
  .description('Resolve all the dependencies required for compilation')
211
219
  .action(async (str, opts) => {
220
+ pin(program.opts());
212
221
  clear(str);
213
222
  if (program.opts().alone === undefined) {
214
223
  await coms().register(program.opts());
@@ -223,6 +232,7 @@ program.command('resolve')
223
232
  program.command('transpile')
224
233
  .description('Convert EO files into target language')
225
234
  .action(async (str, opts) => {
235
+ pin(program.opts());
226
236
  clear(str);
227
237
  if (program.opts().alone === undefined) {
228
238
  await coms().register(program.opts());
@@ -238,6 +248,7 @@ program.command('transpile')
238
248
  program.command('compile')
239
249
  .description('Compile target language sources into binaries')
240
250
  .action(async (str, opts) => {
251
+ pin(program.opts());
241
252
  clear(str);
242
253
  if (program.opts().alone === undefined) {
243
254
  await coms().register(program.opts());
@@ -273,6 +284,7 @@ program.command('dataize')
273
284
  .option('--stack <size>', 'Set stack size for the virtual machine', '64M')
274
285
  .option('--heap <size>', 'Set the heap size for the VM', '256M')
275
286
  .action(async (str, opts) => {
287
+ pin(program.opts());
276
288
  clear(str);
277
289
  if (program.opts().alone === undefined) {
278
290
  await coms().register(program.opts());
@@ -297,6 +309,7 @@ program.command('test')
297
309
  .option('--stack <size>', 'Set stack size for the virtual machine', '64M')
298
310
  .option('--heap <size>', 'Set the heap size for the VM', '256M')
299
311
  .action(async (str, opts) => {
312
+ pin(program.opts());
300
313
  clear(str);
301
314
  if (program.opts().alone === undefined) {
302
315
  await coms().register(program.opts());
@@ -315,6 +328,7 @@ program.command('test')
315
328
  program.command('docs')
316
329
  .description('Generate documentation from XMIR files')
317
330
  .action((str, opts) => {
331
+ pin(program.opts());
318
332
  coms().docs(program.opts());
319
333
  });
320
334
 
@@ -357,6 +371,7 @@ program.command('jeo:disassemble')
357
371
  'xmir'
358
372
  )
359
373
  .action((str, opts) => {
374
+ pin(program.opts());
360
375
  coms().jeo_disassemble({...program.opts(), ...str});
361
376
  });
362
377
 
@@ -380,6 +395,7 @@ program.command('jeo:assemble')
380
395
  program.command('latex')
381
396
  .description('Generate LaTeX files from EO sources')
382
397
  .action(async (str, opts) => {
398
+ pin(program.opts());
383
399
  clear(str);
384
400
  await coms().register(program.opts());
385
401
  await coms().parse(program.opts());
@@ -389,6 +405,7 @@ program.command('latex')
389
405
  program.command('fmt')
390
406
  .description('Format EO files in the source directory')
391
407
  .action(async (str, opts) => {
408
+ pin(program.opts());
392
409
  clear(str);
393
410
  await coms().register(program.opts());
394
411
  await coms().parse(program.opts());
@@ -417,6 +434,17 @@ function clear(str) {
417
434
  }
418
435
  }
419
436
 
437
+ /** Checks --pin option and fails if version mismatch.
438
+ * @param {*} opts Options
439
+ * @throws {Error} If version mismatch
440
+ */
441
+ function pin(opts) {
442
+ if (opts.pin && opts.pin !== version.what) {
443
+ console.error(`Version mismatch: you are running eoc ${version.what}, but --pin option requires ${opts.pin}`);
444
+ process.exit(1);
445
+ }
446
+ }
447
+
420
448
  /**
421
449
  * Get commands for the target language.
422
450
  * @return {Object} - commands
package/src/mvnw.js CHANGED
@@ -56,6 +56,7 @@ module.exports.flags = function (opts) {
56
56
  `-Deo.generatedDir=${path.resolve(opts.target, 'generated-sources')}`,
57
57
  `-Deo.placed=${path.resolve(opts.target, 'eo-placed.csv')}`,
58
58
  `-Deo.placedFormat=csv`,
59
+ `-Deo.skipLinting=${opts.blind ? 'true' : 'false'}`,
59
60
  opts.trackTransformationSteps ? '-Deo.trackTransformationSteps' : '',
60
61
  ];
61
62
  };
@@ -69,6 +70,7 @@ module.exports.flags = function (opts) {
69
70
  */
70
71
  module.exports.mvnw = function (args, tgt, batch) {
71
72
  return new Promise((resolve, reject) => {
73
+ console.debug(`Running mvnw with arguments: ${args.join(' ')}`);
72
74
  target = tgt;
73
75
  phase = args[0];
74
76
  const home = path.resolve(__dirname, '../mvnw');
package/src/version.js CHANGED
@@ -6,6 +6,6 @@
6
6
  // The values here are replaced automatically by the .rultor.yml script,
7
7
  // at the "release" pipeline:
8
8
  module.exports = {
9
- what: '0.33.5',
10
- when: '2026-02-15'
9
+ what: '0.34.0',
10
+ when: '2026-02-19'
11
11
  };