Code Monkey home page Code Monkey logo

Comments (7)

WasabiFan avatar WasabiFan commented on July 30, 2024

You're the first person (as far as I know) to test this in it's current state, so there may be some issues (sorry!).

Can you try again (pull upstream changes first)? I think the problem was that I hadn't fully removed some bad scripts from the fork of the library that our autogen package tries to install. Because it is installing from a git repo instead of from NPM itself, NPM doesn't automatically run the build scripts, so I had to configure it manually (and the issue was in that custom configuration).

I also made some changes to the autogen readme so that it's more understandable.

from ev3dev-lang.

ddemidov avatar ddemidov commented on July 30, 2024

This manages to get further, but npm install still ends with an error: https://gist.github.com/4164b089de53f82c752e

from ev3dev-lang.

WasabiFan avatar WasabiFan commented on July 30, 2024

@ddemidov Sorry for the late reply, I was very busy and completely forgot to reply to this thread.

I think I have fixed all the issues (and I have tested it on multiple clean installs of the OS). The problem appears to be how npm ran my scripts: the module was installing and running the prepublish script, which would run the compile script, which would try to install some dependencies, which would trigger the prepublish again and create an infinite loop. It should be fixed now -- and thanks for your patience!

from ev3dev-lang.

ddemidov avatar ddemidov commented on July 30, 2024

It works! Thank you, I'll continue my experiments with autogen.

from ev3dev-lang.

ddemidov avatar ddemidov commented on July 30, 2024

The following command runs fine:

$ node autogen.js 
4 files found
Completed processing file "js/extras.ts"
Completed processing file "js/motor.ts"
Completed processing file "js/sensor.ts"
Completed processing file "wrapper-specification.md"

If, however, I modify an autogen block inside one of the generated files (for example

diff --git a/extras.ts b/extras.ts
index 8e3338f..29784d0 100644
--- a/extras.ts
+++ b/extras.ts
@@ -3,7 +3,6 @@
 ///<reference path="io.ts" />

 //~autogen autogen-header
-    // Sections of the following code were auto-generated based on spec v0.9.2-pre, rev 1. 
 //~autogen

 class PowerSupply extends Device {

), then node autogen.js results in the following error:

$ node autogen.js 
4 files found
Completed processing file "js/motor.ts"
Completed processing file "js/sensor.ts"
Completed processing file "wrapper-specification.md"
Error processing file "js/extras.ts": Error: ENOENT, open 'js/extras.ts'

It seems that autogen does not overwrite a file if its contents did not change, but fails when there are some changes to apply.

from ev3dev-lang.

ddemidov avatar ddemidov commented on July 30, 2024

The error above does not happen when node is run from the top level directory:

$ node autogen/autogen.js 
4 files found
Completed processing file "js/motor.ts"
Completed processing file "js/sensor.ts"
Completed processing file "wrapper-specification.md"
Completed processing file "js/extras.ts"

Is that the intended behavior?

from ev3dev-lang.

WasabiFan avatar WasabiFan commented on July 30, 2024

@ddemidov Feel free to reopen this if you come across any more issues.

from ev3dev-lang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.