Open Chris2011 opened 6 years ago
If you can run patch
from the command line, try running ant copy-ts
from the command line in the nbts directory.
For what is the patch for? In general I don't have patch on windows. I installed it from GNU and I can call patch via cmd but it does nothing. And the build failed with this error:
C:\Projekte\Netbeans Plugins\nbts>ant copy-ts
Buildfile: C:\Projekte\Netbeans Plugins\nbts\build.xml
copy-ts.check:
copy-ts:
[delete] Deleting directory C:\Projekte\Netbeans Plugins\nbts\server\ts
[copy] Copying 94 files to C:\Projekte\Netbeans Plugins\nbts\server\ts
[patch] patching file compiler/checker.ts
[patch] Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
[patch]
[patch] This application has requested the Runtime to terminate it in an unusual way.
[patch] Please contact the application's support team for more information.
BUILD FAILED
C:\Projekte\Netbeans Plugins\nbts\build.xml:48: 'patch' failed with exit code 3
Total time: 4 seconds
I really would like to contribute, but I can't because of that, what I mentioned.
The patches add some additional functionality to the language service.
If you can't get patch
working, you could always just comment out the <patch .../>
element in build.xml, and apply the patches in server/ts manually.
Ok, will try to use it w/o patch, will only add some templates. Please see the PR which are still open.
The one with the templates is interesting.
Or add us as contributors please.
@jeffrey-easyesi I downloaded the sources for TypeScript and added the path to the build.xml but I got this error:
C:\Projekte\Netbeans Plugins\nbts\build.xml:50: Execute failed: java.io.IOException: Cannot run program "C:\Projekte\Others\TypeScript\bin\tsc" (in directory "C:\Projekte\Netbeans Plugins\nbts"): CreateProcess error=193, %1 ist keine zulässige Win32-Anwendung
Of course it is correct, but I thought tsc will open with node, and when I try this in my command line: node C:\Projekte\Others\TypeScript\bin\tsc
then I got the help section.
So the build script will not start the node before it calls the tsc. Did I download the wrong code for TypeScript? I got it from here: https://github.com/Microsoft/TypeScript.
Again, I'm a windows user.
Ok I got it working, I changed the tsc to tsc.cmd. But now I got this problem:
Building nbts-services.js
server/main.ts(319,57): error TS2339: Property 'length' does not exist on type '__String'.
Property 'length' does not exist on type 'void & { __escapedIdentifier: void; }'.
server/main.ts(470,88): error TS2345: Argument of type '__String' is not assignable to parameter of type 'string'.
Type 'void & { __escapedIdentifier: void; }' is not assignable to type 'string'.
C:\Projekte\Netbeans Plugins\nbts\build.xml:74: exec returned: 1
BUILD FAILED (total time: 26 seconds)
At line 319, we have this: node.text && highlight(node.end - node.text.length, node.end, attr);
Can anyone help here out? I want to contribute to this project, but I can't because it is not building. @geekdenz @jeffrey-easyesi @jamie-everlaw
@Chris2011 Maybe try a stable or even older (stable) version of TypeScript like a release or earlier tagged version. Not sure which tag it is, but if there is a patch, you need a specific version that the patch was written for. Might be in the meta data of the patch, although, tbh I don't know the exact algorithm patch uses. Generally, one shouldn't get caught up in wanting the latest all the time. Sometimes stability or even an earlier version with less features can be better for one's purpouses.
@Chris2011 Maybe try a stable or even older (stable) version of TypeScript like a release or earlier tagged version. Not sure which tag it is, but if there is a patch, you need a specific version that the patch was written for. Might be in the meta data of the patch, although, tbh I don't know the exact algorithm patch uses. Generally, one shouldn't get caught up in wanting the latest all the time. Sometimes stability or even an earlier version with less features can be better for one's purpouses.
Thx will have a look.
@jeffrey-easyesi which exact version did you use?
@Chris2011 Everything about the build process is in build.xml.
Thx for the help....not. When everything would be clear, I wouldn't ask for help.
And I think you only did this under linux w/o any problems. I use windows.
Hey,
I can’t build the source of NBTS. I downloaded the TypeScript sources from: https://github.com/Microsoft/TypeScript. And I changed the path in the build.xml to the typescript sources and after hit „run“ I got this error:
So it seemed, that I needed a patch command, I installed it from GnuWin32 and set it to my PATH variable (I have Windows 10), but this doesn’t work out for me. Can you help here?
Regards
Chris