how to install tabnine manually without ethernet (vs code extension) - visual-studio-code

Trying to install tabnine vs code extension from a pc with ethernet to a desktop without ethernet access.
I tried to manually install the extension by copying its files from .vscode/extensions folder.
after doing so I received this error:
"tabnine extension was unable to download its dependencies"
any ideas how to solve it?

While this is more a case-by-case question (as many extensions have special dependencies), I am trying to offer some background information for you reference.
Why an extension needs separate downloads
Many reasons but typical ones are,
Make the main downloads from VS Code Marketplace small
Host OS dependent dependencies (language server/debugger or others) externally so that at runtime the extension downloads only for a specific OS.
Many extensions can utilize the new platform specific packaging mode of vsce, but not for old extensions out of maintenance.
Is there a common way for extension authors to specify such separate downloads?
No. VS Code does not have a standard here, so extension authors can do whatever they like.
Tabnine specific
Now back to your question. To learn what tabnine extension wants to download and where on disk those files should be put, your only option is to ask its developer(s) or dig into the source code.
Side Notes
I did internalize many similar extensions for my clients under the product Scarborough for VS Code, so I would like to kindly inform you that many extensions were never designed to work in an environment without internet access. So you might need more hacking than you initially thought.

may be have a problem with your IP location only using vpn and reload

Related

Is there a VSCode configuration variable for the bundled extensions folder?

I'm authoring an extension and running it in the debugger, which is mostly working smoothly.
But I'd like to disable debugging other extensions while I'm debugging mine.
I've been able to disable debugging for installed extensions using this, in my launch.json:
skipFiles: [
"${env:HOME}/.vscode/extensions/**"
]
(Incidentally, I don't know whether that's the right location on Windows -- it might be -- but I'm on macOS. It's probably correct for Linux also.)
But I can't seem to disable it for bundled extensions without hard-coding my VSCode installation location:
skipFiles: [
// Below does not work for some reason
"${execPath}/../../Resources/app/extensions/**",
// Below works if we have correctly guessed the install location
"${env:HOME}/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/**"
]
I dumped the VSCode environment and I have a bunch of variables that look fairly unreliable, like VSCODE_GIT_ASKPASS_MAIN, that basically lead me to the same problem. I'm not sure why the execPath variable above doesn't work, but even if it did, it'd be macOS-specific. My other solution requires me to guess the install location (which I guess I could try to do with versions for Windows / macOS / Linux and dealing with common installation locations for those, but even this would not be foolproof).
Is there another, more directly applicable configuration variable I could use for this purpose? My question is similar to this one, but in that one the need was to access an extension's own path from its implementation; mine is from the launch.json configuration file (and I want the path for all extensions, not my extension).

Not able to download language packs for extensions other than core extensions

I have two different TYPO3 9.5.20 installations.
The problem is: In one of both I'm not able to download the German language packages, while on the other it works fine. Both seem to have the same configuration and folder structure.
The not-working installation is telling me 1 language pack not available while trying to download for a single extension.
I tried disabling all non-core extensions except for the ones I want to download the language packages, but that didn't help either.
I was able to download translations for the core-extensions, but all others don't seem to work.
Any ideas where I could look for the problem and compare the two installations or what could cause the problem?
The problem was the enabled feauture newTranslationServer in my LocalConfiguration.php.
This caused TYPO3 to use the translationBaseUrl https://localize.typo3.org/xliff/ instead of https://extensions.typo3.org/fileadmin/l10n/ what resulted in a 404 for all non-core extensions.
I don't know how the configuration got there, but it wasn't on purpose so I disabled it. Maybe this can help someone else.

Duplicate hints while typing expression in Visual Studio Code

Why do I have the same suggestions while typing expression?
Example:
I had exactly the same problem. After a week or so, it get really annoying.
basically, as the comments hint to, there are probably multiple linting or intelisense tools. In my case (for python) i had the pylance extension added.
When i disabled this, the problem went away, but features were missing. So i added it back...
For some reason (i dont know why), this fixed the problem !!!
I can only hypothesise that in some way the extension was corrupted. Nevertheless, it worked.
EDIT:
I can also confirm that unchecking this setting appears to work:
Jupyter: Pylance Handles Notebooks
My current system is Windows 11, with python 3.10.
Final edit (8 Dec 2022):
This is resolved here:
Please could you install VS Code 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists.
Visual Studio Code provides an API so third-party extensions and built-in modules can contribute suggestions for auto-completion pop-ups. The system is currently designed so suggestions are merely appended—there's no duplicate detection or removal (perhaps because extensions can also take care of sorting suggestions and such algorithm would get on the way). That means that if you have more than one extension or module for a given language you can easily get duplicate entries.
Having several extensions for PHP is not necessarily a bad idea since they can address different needs (for instance, PHP DocBlocker just creates annotations, it doesn't provide auto-completion suggestions) but you have at least two extensions (PHP Intelephense and PHP Intellisense) that do exactly the same things. That's likely to hurt performance (all your workspace files will be scanned several times) and just adds noise.
I suggest you read the extension descriptions carefully to learn what they do exactly and then figure out which ones you need. Remember that extensions can be enabled/disabled in a per-workspace basis.
The following is just my own totally subjective opinion. Among the PHP extensions that provide code intelligence only two of them seem mature enough:
PHP Intelephense
PHP Intellisense
I've tried both. PHP Intelephense works best for me than PHP Intellisense so that's the one I've kept. I've also disabled php.suggest.basic following the installation instructions because basic suggestions didn't add any value to me (they were blind string matching):
Turn off the php.suggest.basic setting for best results.
... as well as taming builtin Emmet support, which was providing really dumb suggestions:
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"
YMMV.
TLDR; Installing pre-release version of Jupyter solves (v2022.11...)
Ok, so after some more extensive experimentation I think I found what's causing this in my case. After looking at the processes I noticed that there were two Pylance processes running, and consistently this would only be a problem if I was working in a session with a jupyter notebook open or one that had been opened.
saun89 17740 37.3 0.3 1008004 199492 ? Sl 20:58 0:22 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:9178e897a2b78b36bfd167f79b36c3bdad2931d71b --node-ipc --clientProcessId=17651
saun89 18743 257 0.7 1304584 382288 ? Sl 20:59 0:20 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:8744a321767eed92821fd737be4dc7dcfb728284e5 --node-ipc --clientProcessId=17651
Pylance basically spins up a service for the workspace, and then spins up a separate service for the notebook.
Output from "Python Language Server" logs:
Disabling Jupyter removes the duplication, and after installing an earlier version of the extension (v2022.4) this appears to have fully resolved the issue. I'm going to go ahead and log the extension bug once I have something reproducible.
As of 11/30/22, Jupyter Extension Pre-Release version v2022.11.1003281132 is the latest version fixes this issue. Click the gear icon next to the extension and you should see "install another version..." Then you can select version v2022.11.1003281132.

Team foundation server on the Mac with Vim

I'm using Vim on a Mac for front-end development and was recently hired at the company that uses Team Foundation Server as their version control system.
I would hate to have to switch to using Visual Studio on Windows because I'm so used to Vim and the Mac.
I found this and was hoping that would be a possible solution. I would still like to avoid editing code in Eclipse. However I wouldn't mind opening Eclipse to do version control stuff.
I'm very unfamiliar with Eclipse and Team Foundation Server (not VCS in general) and I need some advice on how to actually use it.
I'm able to connect to the server and find the project I have to work on, but from here I'm lost. This is the window I'm stuck at.
Anyone who are in a similar situation and could offer some help?
You've done the hard bit I think, firstly you should be able to safely ignore the Work Item and Build "folders" unless someone explicity tells you to use work items, at which point they can show you what you need to know as it works exactly the same as in Visual Studio.
If you double click on the Source Control folder it will open a new window which will show you the source "tree". To be able to Get, Checkout and add source files to the tree you'll need to set up a workspace. Once you've done this then you can get the code and check out.
With Team Explorer Everywhere You also have the option of using the tf command line in the Mac terminal. This would eliminate the need for eclipse. (I'm assuming that as a Vim user you're not afraid to use the terminal)
Another option might be svnBridge however I think you need the server version if you're using a Mac, and this requires a site to be installed in the TFS application server which might not be an option.
Finally TFS now offers support for integration with GIT.

Storing third-party framework/middleware into source control that needs to alter your compiler/IDE

I know there are posts that ask how one stores third-party libraries into source control (such as this and this). While those are great answers, I still can't find the answer to this:
How do you store third-party middleware/frameworks binaries that need to alter your compiler / IDE for the library to work properly? Note: for my needs, I don't need to store the middleware source, I only store header files / lib / JAR ..so that it's ready to be linked.
Typically, you simply link libraries to your app, and you are good. But what about middleware / frameworks that need more?
Specific examples:
Qt moc pre-processor.
ZeroC Ice Slice (ice) compiler (similar to CORBA IDL preprocessor).
Basically these frameworks/middleware need to generate their own code before your application can link to it.
From the point of view of the developer, ideally he wants to just checkout, and everything should be ready to go. But then my IDE/compiler will not be setup properly yet, so the compilation will fail..
What do you think?
Backup everything including the setup of the IDE, operating system, etc. This is what i do
1) Store all 3rd party libraries in source control. I have a branch for all the libraries.
2) Backup the entire tool chain which was used to build. This includes every tool. Each tool is installed into the same directory on each developers computer, so this makes it simple to setup a developers machine remotely.
3) This is the most hardcore, but prepare 1 perfect developer IDE setup which is clean, then make a VMWare / VirtualPC image out of it. This will be useful when you cant seem to get the installers to work in future.
I learned this lesson the painful way because I often have to wade through visual studio 6 code which don't build properly.
I think that a better solution is to make sure that the build is self-contained and downloads all necessary software for itself unless you tell it otherwise. This is the way maven works, and it is really handy. The downside is that it sometimes needs to download a application server or similar, which is highly unpractical, but at least the build succeeds and it becomes the new developers responsibility to improve the build if needed.
This does of course not work great if your software needs attended installs, but I would try to avoid any such dependencies in any case. You can add alternative routes (e.g the ant script compiles the code if eclipse hasn't done it yet). If this is not feasible, an alternative option is to fail with a clear indication of what went wrong (e.g 'CORBA_COMPILER_HOME' not set, please set and try again').
All that said, the most complete solution is of course to ship everything with your app (i.e OS, IDE, the works), but I doubt that that is applicable in the general case, how would you feel about that type of requirements to build a software product? It also limits people who want to adapt your software to new platforms.
What about adding 1 step.
A nant script which is started with a bat file. The developer would only have to execute one .bat file, the bat file could start nant, and the Nant script could be made to do anything you need.
This is actually a pretty subtle question. You're talking about how to manage features of the environment which are necessary in order to allow your build to proceed. In this case it's the top level of your code toolchain, but the problem can be generalised to include the entire toolchain, and even key aspects of the operating system.
In my place of work, we have various requirements of the underlying operating system before our code will successfully run. This includes machine-specific configurations as well as ensuring correct versions of system libraries and language runtimes are present. We've dealt with this by maintaining a standard generic build machine image which contains the toolchain requirements we need. We can push this out to a virgin machine and get a basic environment that contains the complete toolchain and any auxiliary programs.
We then use fsvs to version control any additional configuration, which can be layered on to specific groups of machines as needed.
Finally, we use custom scripts hooked in to our CI server (we use Hudson) to perform any pre-processing steps required for specific projects.
The main advantages for us of this approach is:
We can build and deploy developer and production machines very easily (and have IT handle this side of the problem).
We can easily replace failed machines.
We have a known environment for testing (we install everything to a simulated 'production server' before going live).
We (the software team) version control critical configuration details and any explicit pre-processing steps.
I would outsource the task of building the midleware to a specialized build server and only include the binary output as regular 3rd party dependencies under source control.
If this strategy can be successfully applied depends on whether all developers need to be able to change midleware code and recompile it frequently. But this issue could also be solved via a Continous Integration Server like Teamcity that allows to create private builds.
Your build process would look like the following:
Middleware repo containing middleware code
Build server, building middleware
Push middleware build output to project repository as 3rd party references
Update: This doesn't really answer how to modify the IDE. It's just a sort-of Maven replacement thingy for C++/Python/Java. You shouldn't need to modify the IDE to build stuff, if so, you need a different IDE or a system that generates/modifies IDE files for you. (See CMake for a cross-platform c/c++ project file generator.)
I've written a system (first in Ant/Beanshell at two different places, then rewrote it in Python at my current job) where third-partys are compiled separately (by someone), stored and shared via HTTP.
Somewhat hurried description follows:
Upon start, the build system looks through all modules in repo, executes each module's setup target, which downloads the specific version of a third-party lib or app that the current code revision uses. These are then unzipped, PATH/INCLUDE etc are added to (or, for small libs, copy them to a single directory for the current repo) and then launches Visual Studio with /useenv.
Each module's file check for stuff that it needs, and if it needs installing and licensing, such as Visual Studio, Matlab or Maya, that must be on the local computer. If that's not there, the cmd-file will fail with a nice error message. This way, you can also check that the correct version is in there
So there are a number of directories on the local disk involved. %work% needs to be set using an global environment variable, preferrable on a different disk than system or source-checkout, at least if doing heavy C++.
%work% <- local store for all temp files, unzip, and for each working copy's temp files
%work%/_cache <- downloaded zips (2 gb)
%work%/_local <- local zips (for development or retrieved in other manners while travvelling)
%work%/_unzip <- unzips of files in _cache (10 gb)
%work%&_content <- textures/3d models and other big files (syncronized manually, this is 5 gb today, not suitable for VC either)
%work%/D_trunk/ <- store for working copy checked out to d:/trunk
%work%/E_branches/v2 <- store for working copy checked out to e:/branches/v2
So, if trunk uses Boost 1.37 and branches/v2 uses 1.39, both boost-1.39 and boost-1.37 reside in /_cache/ (as zips) and /_unzip/ (as raw files).
When starting visual studio using bat files from d:/trunk/BuildSystem/Visual Studio.cmd, INCLUDE points to /_unzip/boost-1.37, while if runnig e:/branches/v2/BuildSystem/Visual Studio.cmd, INCLUDE points to /_unzip/boost-1.39.
In the repo, only a small set of bootstrap binaries need to be stored (i.e. wget and 7z).
We currently download about 2 gb of packed data, which is unzipped to 10 gb (pdb files are huge!), so keeping this out of source control is essential. Having this system allows us to keep the repo size small enough to use DVCS such as Mercurial (or Git) instead of SVN, which is very nice. (I'm thinking of using Mercurials bigfiles extension or file sharing instead of a separately http-served directory.)
It work flawlessly. Developers need only to check out, set an enviroment variable for their local cache, then run Visual Studio via a specific batch-file in the repo. No unzipping or compiling or stuff. A new developer can set up his computer in no time. (Installing Visual Studio takes the order of a magnitude more time.)
First time on a new computer takes some time, but then it's fast, only a few seconds. Downloads/unzips are shared on the local computer, do checking out additional branches/versions does not occupy more space. Working offline is also possible, you just need to get the zip files manually if new ones have been uploaded. (This mechanism is essential to test new versions/compilations of third-party libraries.)
The basics are in a repo on bitbucket but it needs more work before it's ready for the public. Apart from doc and polish, I plan to:
extend it to use cmake instead of raw
vcproj-files, to make it more
cross-platform.
script the entire
process from checkout/download of
third-party packages to building and
zipping them (including storing the
download in a local repo) ... currently that's on my dev computer. Not good. Will fix. :)
As for moc, we use Qt's Visual Studio add-in, which stores this in the .vcproj files. Works well. I do think that CMake is one of the best answers for this though