Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues #34

Closed
pinusc opened this issue Sep 3, 2024 · 2 comments · Fixed by #35 or #36
Closed

Build issues #34

pinusc opened this issue Sep 3, 2024 · 2 comments · Fixed by #35 or #36
Assignees
Milestone

Comments

@pinusc
Copy link

pinusc commented Sep 3, 2024

Building this project on my machine yielded several errors that I had to manually fix.

Changes that were necessary on my machine to get this to compile:

  1. An import in build.mjs:
--- a/util/build.mjs
+++ b/util/build.mjs
@@ -6,7 +6,8 @@ import { Version, UpdateVersion, ResetVersion } from './versioning.mjs';
 import { Logger } from './log.mjs';
 import { exit } from 'process';
 
-import { name as PluginName } from "../plugin.json" with { type: "json" };
+import  name  from "../plugin.json" with { type: "json" };
+const PluginName = name;
 import deploy from "../deploy.json" with { type: "json" };
 
 if (process.argv.includes('-h') || process.argv.includes('--help')) {
~
  1. In lipe (this is an upstream issue but I believe it's a library by the author of this project), lib/ES6/utils/util.js,
-import { Format } from "./Formatter";
+import { Format } from "./Formatter.js";
  1. In backend/Cargo.toml, adding time = "0.3.36" as a dependency (otherwise it would pull 0.2.22 as a dependency of actix, which refuses to build in current rustc versions.

These were all surprising issues. It's rare to see rustc not being backwards compatible, but apparently in this case the only fix is updating time manually. (1) I think is problematic because json imports are experimental in node (https://nodejs.org/api/esm.html#json-modules) and so there might be a syntax difference with older node versions. I have no idea what could cause (2) to work on one machine but not mine (file extensions have been mandatory in ESM import modules since at least v20, see https://nodejs.org/docs/latest-v20.x/api/esm.html#mandatory-file-extensions)

The above was necessary in order to get ./build.sh to work with the following software versions:

  • rustc 1.80.1 (3f5fd8dd4 2024-08-06) (Arch Linux rust 1:1.80.1-1)
  • cargo 1.80.1 (376290515 2024-07-16)
  • node --version is v22.7.0
  • pnpm --version is 9.7.1

This is on master branch, 862055a.

Further, adding a couple lines in the README for build instructions would be nice - in particular that node, pnpm and cargo are needed, and if newer versions are explicitly unsupported (which really shouldn't be the case), what version this is supposed to run on.

@CEbbinghaus
Copy link
Owner

The lipe problem is known and 110% my fault (have been too lazy to update. Will get on that). The rest is very surprising to me. All versions are defined in the mise.toml in the project root. Mise can be used to automatically manage the installed versions. It was passing in Github which is a little strange. I fixed the Json thing and that is now in master. I'll do the same for lipe and as for cargo I reccomend downgrading and using 1.79 for the moment.

I am working on a contributing section to outline the code of conduct and how to get started developing.

@CEbbinghaus
Copy link
Owner

Please do let me know if the build problems persist with the 1.79.0 version of cargo. I'll probably update to latest cargo at some point.

@CEbbinghaus CEbbinghaus self-assigned this Sep 7, 2024
@CEbbinghaus CEbbinghaus added this to the 1.0.0 milestone Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants