You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client/README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,27 @@ Any Gobra program can be converted to a Go program and back by running the comma
31
31
This extension caches verification results by default.
32
32
The cache can be flushed by running the command `Gobra: Flush ViperServer cache` from the command palette.
33
33
34
+
### Verification of Packages
35
+
A package can be split across multiple `.go` or `.gobra` files.
36
+
To verify them together, run the command `Gobra: Verify currently opened package` while having one of these files open.
37
+
Alternatively, there is the `Gobra: Verify currently opened file or package` command that either verifies a single file or a package depending on your Gobra settings.
38
+
39
+
Also relevant when working with larger projects is the option to specify directories in which Gobra tries to resolve imports and a module name.
40
+
Include directories can be specified in the settings as `gobraSettings.includeDirs`.
41
+
Gobra has partial support for modules meaning that the current module name can be specified in the settings as `gobraSettings.moduleName`.
42
+
Importing a package in the current module amounts to an import path consisting of the module name and the relative path to the desired package.
43
+
When resolving such an import, Gobra simply drops the module name prefix.
44
+
However, there is currently no dedicated support for resolving packages in external modules.
45
+
This means that Gobra tries to resolve such packages by searching for a sub-directory with the external module name in the specified list of include directories.
46
+
47
+
Note that VSCode allows workspace-specific settings by creating the file `.vscode/settings.json` relative to the root of a workspace.
48
+
These workspace-specific settings take precendence over the usual user settings.
49
+
34
50
### Show Intermediate Representations
35
51
Right clicking on some selected code in a Gobra program reveals two actions, "Show internal representation preview" and "Show Viper code preview".
36
52
Both actions result in a preview, on the right-hand side, of the internal representation used by Gobra and the resulting code in the Viper intermediate language, respectively.
37
53
The translated parts of the selected code are marked in green.
38
54
39
-
## Limitations
40
-
Gobra IDE currently only supports verification of single files.
41
-
Other files located in the same folder are ignored.
42
-
Furthermore, it is at the moment not possible to configure Gobra IDE to consider other directories than specified in the `GOPATH` environment variable when importing packages.
43
-
44
55
## Requirements
45
56
-[Java JDK, 64 bit, version 1.8 or later](https://www.java.com/en/download/)
0 commit comments