Acode icon indicating copy to clipboard operation
Acode copied to clipboard

[Feature Request] Termux Rest

Open Nebdir opened this issue 4 years ago • 5 comments

It would be wounderfull if the ide would allow to call "external" tools or urls to connect the ide with termux and an rest service to provide autocomplete or compile stuff.

it would be simple to add a new menu entry to provide a "slot" for custom commands.

did i miss a point?

Nebdir avatar May 30 '20 07:05 Nebdir

Thanks for the suggestion, I'll look for way to implement this.

deadlyjack avatar May 31 '20 01:05 deadlyjack

what you should do is to implement some extesibility mechanism (If you didn't already) and let others worry about integrating with third party apps. I believe that the best solution to be able to run tools on termux or userland from acode it would be to SSH into the instance.

i recently made an succesfull attempt to develop on android using userland.

the test project has an angular frontend and a nodejs backend. i tried termux first : Working on the sd card, I wasn't able to npm install dependecies because some packages required hard linking from the internal termux fs to the shared mount ( internal sd card ).

the internal sd (or external for that matter ), are both exFAT which doesn't support hard links.

the simpler solution, to edit directly files on the home folder of termux, doesn't work either ... acode ( or any other app for that matter ) cannot acces the private data of termux ( or any other app ).

i tried an ftp server on termux, the ftp client in acode doesn't get any responses from the ftp server ( i believe android or termux is at fault ), and anyway ftp would be very slow....

the solution i came up with was to use unison to keep an internal folder ( where i do compilation, git pushpull, package installation, etc... ) synchronized with the sd folder where editing with acode takes place. I left node_modules out of synchronization - it is huge and unnecessary for code editing.

now, termux has its' own special package repository where unison is not available, compilation from source didn't work either. there's a feature request @termux for unison and duplicity ( an equivalent tool ) to be made available in the termux repo, but at the time of writing this, no solution provided.

i switched to userland, unison is available and everything works awesome, i've got the ng server running in parallel with the loopback 4 one. code synchronization works out of the box ( the synch daemon has been up and is running unintrerupted for about 3 weeks now ).

what i would like to have from acode is the same degree of extensibility that we have in vscode.... then some basic tools like git or linting using the userland command shell,

if you're looking at integration, look at userland first, and use an unrooted tablet.

alfu32 avatar Jun 20 '20 19:06 alfu32

Lets get this clear. An API is needed in any way to extend the ide. A broadcast would be the " android " way, it might fit our needs. you can share files and recieve data back(lint annotations, spellcheck...).

another way is to use ssh as @alfu32 suggested. this would allow access to a wide option of tools but communicating back might be a problem. and parsing isnt a option as this would require a consistent ssh environment across devices. and rest api would solve basic callback / streaming needs, maybe a combination of both...

as the title suggested, the rest api could handle alot more. but it needs a clear pattern, with an endpoint documentation. this would allow raw data streams in paralel communication. as well as single request and responses. a user could add a url to a service and it could respond with offering services. even working with multiple people together could be a thing. autocomplete to go or compiling into a network! all this throught an easy to use api, even more features can be added with clear definitions.

althought a background service would be needed if things gets really straight forward.

userland is new to me, ill dig into it before i decide my opinion, but it seems to be a alternernative to using the termux chroot options

but i dont know where you would like to see this project in future, any ideas?

Nebdir avatar Jun 20 '20 20:06 Nebdir

I’d like to have ts linting, git diff, commit, branches .... terminal. ..... I’m looking at vscode.

For that you’ll need to add vertical tabs on the side panel.

The plugins can specify the vertical tab button, the panel content, have access at the file system wrapper, at the current ace.editor and eventually to be able to specify menu entries.

The plugins should come packaged in a specific format ( vsx ?, textmate ? )

Maybe you’d be able to reuse the vsx/textmate format and make it compatible with them.

sublime text or Textastic are using textmate extensions ( I don’t know how much from textmate is supported ).

Switching ace for Monaco won’t work unless m$oft fixes compatibility with touch events.

alfu32 avatar Jun 23 '20 17:06 alfu32

Would this get us custom type definitions compatibility? It would be great, I'm not sure if opening another request for that would be redundant with this...

chCharly avatar Oct 03 '21 17:10 chCharly