Giter Club home page Giter Club logo

spacemandmm's Introduction

SpacemanDMM

SpacemanDMM is a suite of tools for working with DreamMaker codebases and map files. It features a full-size fancy map renderer, a language server, and a documentation generator for DM codebases.

Language server updates are released to the editor extensions on a regular basis and binaries are occasionally posted to the releases page. Building from source is recommended to get the latest updates to the map renderer.

The documentation and static analysis tools can be run as part of a continuous integration build; see /tg/station's CI suite for an example.

Support is currently provided in /tg/station13's coderbus (ping SpaceManiac) and on the issue tracker. Pull requests are welcome.

The language server provides autocomplete, go-to-definition, and other code intelligence for the DreamMaker language. The preferred installation method is the Visual Studio Code extension (source). There is also a Sublime Text 3 package (source), and the implementation is compatible with most language server clients.

The map renderer produces full-scale PNGs of .dmm map files, including configurable emulation of in-game graphical enhancements not usually visible in the editor, specialized for /tg/station13 but likely to work on similar codebases.

$ cd path/to/tgstation/
$ dmm-tools minimap _maps/map_files/MetaStation/MetaStation.dmm

By default, output is saved to data/minimaps/, which can be changed with the -o flag. More detailed usage information is available in the --help output.

For examples of the maps produced, visit the SS13 WebMap.

dmdoc is a simple Doxygen-esque documentation generator for DreamMaker code. Files, macros, types, vars, and procs can be documented. Documentation comments start with /** or /// when preceding the documented item, or /*! or //! when contained within it.

The contents of code/README.md are rendered as the index page and other Markdown files within the code/ directory are included in the output. The generated documentation also includes GitHub links to item definitions.

For an example of the generated documentation, see /tg/station13's code docs.

DreamChecker is SpacemanDMM's static analysis tool. It can generate several type-safety diagnostics which DreamMaker does not, and extends the langauge with return-type annotations, described in its documentation. It is suitable for running in continuous integration environments.

Building

To build locally, begin by installing Rust or updating your existing installation. SpacemanDMM is tested against stable Rust.

Clone this repository and run cargo build --release to build the full suite in target/release/. List and build individual binaries with cargo build --release --bin. See the source readme for more information on the individual packages.

Docker

A dockerfile is provided for the map generator binary. To build the docker image, enter the SpacemanDMM directory and run:

docker build -t spacemandmm .

To use the image, switch to the codebase you want to generate maps for and invoke the container:

docker run -v "$PWD":/usr/src/codebase --rm -it spacemandmm -e /usr/src/codebase/tgstation.dme minimap /usr/src/codebase/_maps/map_files/BoxStation/BoxStation.dmm

License

SpacemanDMM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SpacemanDMM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SpacemanDMM. If not, see http://www.gnu.org/licenses/.

spacemandmm's People

Contributors

anturk avatar cyberboss avatar damianx avatar dependabot[bot] avatar dreamyskrell avatar fira avatar igorsaux avatar jupyterkat avatar lemoninthedark avatar lettern avatar mloc avatar mothblocks avatar moxian avatar neerti avatar nfreader avatar out-of-phaze avatar pali6 avatar pjb3005 avatar quardbreak avatar spacemaniac avatar spookerton avatar spookydonut avatar tigercat2000 avatar tiviplus avatar valtosin avatar watermelon914 avatar willox avatar xaltonon avatar yoyobatty avatar zewaka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spacemandmm's Issues

Parser isn't aware of raw strings

512.1386 added raw strings:

DM now supports a raw string format, starting with the @ character. There are three formats: @"..." which cannot include newlines, @{"..."} which can, and @(XYZ)...XYZ (where XYZ can be almost anything) which is the same. Raw strings will not parse backslash escapes, or embedded [] expressions. These are very useful for creating regular expressions

https://github.com/tgstation/tgstation/blob/2f5a9ad416c71c30580a685c3d6a4233f6c97e06/code/datums/diseases/decloning.dm#L9

Spurious .dme edits with tickOnCreate disabled

Setting "tickOnCreate": false does not disable the file system listener reacting to deletion events.

Unfortunately VS Code doesn't seem to provide a way to hook only create/delete operations initiated by the editor, so the suboptimal file system listener needs to be fully optional.

Reported by Antur.

Variable declarations are inconsistent between type tree and procs

Outside of procs (in the type tree), the following is not parsed correctly:

/datum
    var foo = 5

Inside of procs, the following is not parsed correctly (see also #45):

/proc/foo()
    var { bar = 5; baz = 6 }

The inside-procs and outside-procs code paths for var declarations probably need to be merged.

Can't parse '(' inside ternary 'in' expression

world/New()
	return (1 in (1 to 5))

fails with:

line 2, column 18:
error: got 'to', expected one of: operator, field access, '?', ')'

world/New()
	return (1 in 1 to 5)

The above is instead parsed correctly.

"that document isn't opened" after langserver panic

  1. The language server panics for any reason (e.g. #39).
  2. VS Code's language client support sees that the language server has crashed, and automatically restarts it.
  3. Although VS Code knows the language server has crashed, and therefore lost state, it does not resynchronize state.
  4. The lost and non-resynchronized state included the fact that a given document was opened.
  5. The next attempt by the language client to notify the language server of a modified document sends a document identifier which the new language server instance no longer knows about.
  6. This error is raised, repeatedly:

None => return Err(invalid_request("that document isn't opened")),

A workaround could suppress the message and/or poorly make up for the lost state by reading from disk, but the real problem is the state desynchronization. Either the language server needs to remember that state somehow, or VS Code needs to be instructed to resynchronize it somehow.

Colon can be used instead of slash in var declarations

/obj
    var:last_movement_dir = 0

The above code seems to work correctly, for some reason.
At the moment, dmm-tools check reports it as an error and aborts:

code/modules/power/singularity/singularity.dm, line 40, column 5:
error: got ':', expected one of: '/', '[', contents, newline, '}', identifier

I found out that an arbitrary amount of :. is also happily accepted by DM.

/obj
    var:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.last_movement_dir = 0

This should probably be turned into a warning.

VSCode extension may be locking .dme file

Not the first time I encounter this, but I'm not sure how to reliably reproduce it.
Basically, I think the extension is locking the .dme so git can't write to it.

$ git pull pomf Bleeding-Edge
vgstation13.dme: Permission denied

Closing VS Code or disabling the extension fixes the problem.

I can try getting a test case if this is not enough info.

Doesnt work with other code

I am attempting to render a TG fork
https://github.com/OracleStation/OracleStation

renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/obj/structure/lattice"
renderbus_1  | Warning: missing "/obj/structure/grille/broken"
renderbus_1  | Warning: missing "/turf/open/space"
renderbus_1  | Warning: missing "/obj/structure/grille"
renderbus_1  | Warning: missing "/turf/closed/wall/r_wall"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"
renderbus_1  | Warning: missing "/turf/open/space/basic"

(This is running in docker, but the same happens outside)

Does this only work with TG, and not even TG forks?

Update structure render_pass

loot is also a var name to check under for objects to spawn. Unsure if you can match against two different var names though!

Numbers larger than 10 ** 32 are broken

Attempting to run dmm-tools check on
#define ARBITRARILY_PLANCK_NUMBER 1.417*(10**32)
will fail with the error:
error: out-of-range Pow: 10 ** 32.

This is because the number is larger than i32::max_value().

Langserver capability wishlist

Described in the spec starting here. See also the kanban board.

  • completion
    • resolve
  • hover
  • signatureHelp
  • definition
  • typeDefinition
  • implementation
  • references
  • documentHighlight
  • documentSymbol
  • codeAction
  • codeLens
    • resolve
  • documentLink
    • resolve
  • documentColor
  • colorPresentation
  • formatting
  • rangeFormatting
  • onTypeFormatting
  • rename

Bad UX when opening a folder with no .dme

If "Open Folder" is used but the .dme is not in that folder, no warning is generated whatsoever (even the "no .dme file" log message is absent):

directory: c:\MSVisualStudioCode\Byond
workspace root: c:\MSVisualStudioCode\Byond
Notify NYI: workspace/didChangeConfiguration => ...snip...

From then on, every cursor movement spams error messages:

Request textDocument/hover failed.
  Message: no preprocessor
  Code: -32600 

Maps from hippiestation don't produce output or errors

E.g. boxstation at commit HippieStation/HippieStation@ce34d0e

Remember to set the .dme to hippiestation.dme

Sample:

MapDiffBot.Generator.GeneratorException: Unable to find .png file in dmm-tools output!
parsing hippiestation.dme
Command line: -e "hippiestation.dme" minimap --disable hide-space "S:\Website\Cyberbot\App_Data\Requests\MapDiffs\Repositories\HippieStation\HippieStation\_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm.old_map_diff_bot"
parsing hippiestation.dme
Output:

parsing hippiestation.dme

Error:


   at MapDiffBot.Generator.DiffGenerator.<RenderMap>d__9.MoveNext() in S:\Documents\Actual Documents\DA Git\MapDiffBot\MapDiffBot.Generator\DiffGenerator.cs:line 173
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MapDiffBot.WebHook.PullRequestPayloadHandler.<GenerateMapDiff>d__13.MoveNext() in S:\Documents\Actual Documents\DA Git\MapDiffBot\MapDiffBot.Webhook\PullRequestPayloadHandler.cs:line 304
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at MapDiffBot.WebHook.PullRequestPayloadHandler.<GenerateMapDiff>d__13.MoveNext() in S:\Documents\Actual Documents\DA Git\MapDiffBot\MapDiffBot.Webhook\PullRequestPayloadHandler.cs:line 361
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MapDiffBot.WebHook.PullRequestPayloadHandler.<Run>d__14.MoveNext() in S:\Documents\Actual Documents\DA Git\MapDiffBot\MapDiffBot.Webhook\PullRequestPayloadHandler.cs:line 389
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MapDiffBot.WebHook.PayloadDelegator.<>c__DisplayClass5_0.<<ProcessPayload>b__0>d.MoveNext() in S:\Documents\Actual Documents\DA Git\MapDiffBot\MapDiffBot.Webhook\PayloadDelegator.cs:line 108

Non-useful linter output for an unknown error

{
	"resource": "/G:/Git/vgstation/(unknown)",
	"owner": "_generated_diagnostic_collection_name_#7",
	"code": "undefined",
	"severity": 8,
	"message": "got '__EOF__', expected one of: unary operator, term",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 1
}

Specifically the problem here is that, since I don't know where the linter was when it threw this error, I have no idea how to fix the problem.

Possibly related:

{
	"resource": "/G:/Git/vgstation/code/game/machinery/doors/firedoor.dm",
	"owner": "_generated_diagnostic_collection_name_#7",
	"code": "undefined",
	"severity": 8,
	"message": "got '1', expected one of: identifier, '/', '[', contents, newline, '__EOF__', '/', identifier",
	"startLineNumber": 1,
	"startColumn": 12,
	"endLineNumber": 1,
	"endColumn": 12
}

This error is for a line that is valid when removed from this codebase and linted on its own:
/var/const/OPEN = 1

Package documentation

Each crate should have a README.md describing its functionality and usage, and at least nominal rustdocs.

  • cli
  • dmdoc
  • dreamchecker
  • dreammaker
  • editor
  • interval-tree
  • langserver
  • tools

The root README.md should link to the different release channels, briefly summarize each user-facing crate (cli, dmdoc, editor, langserver) and link to their READMEs, and briefly describe building (since it's pretty much the same project-wide).

Failing to build - "linking with `cc` failed"

Failing to build under WSL.

[23:35:36] root@poo:/mnt/d/Spess/spacemandmm >cargo build -p cli --release --verbose
       Fresh pkg-config v0.3.11
       Fresh cc v1.0.15
       Fresh matches v0.1.6
       Fresh unicode-xid v0.1.0
       Fresh cfg-if v0.1.3
       Fresh nodrop v0.1.12
       Fresh libc v0.2.40
       Fresh unicode-normalization v0.1.7
       Fresh percent-encoding v1.0.1
       Fresh scopeguard v0.3.3
       Fresh memoffset v0.2.1
       Fresh lazy_static v1.0.0
       Fresh rgb v0.8.9
       Fresh byteorder v1.2.3
       Fresh either v1.5.0
       Fresh unicode-width v0.1.5
       Fresh adler32 v1.0.2
       Fresh rawpointer v0.1.0
       Fresh fixedbitset v0.1.9
       Fresh bitflags v1.0.3
       Fresh linked-hash-map v0.5.1
       Fresh vec_map v0.8.1
       Fresh strsim v0.7.0
       Fresh interval-tree v0.8.0 (file:///mnt/d/Spess/spacemandmm/src/interval-tree)
       Fresh ansi_term v0.11.0
       Fresh dtoa v0.4.2
       Fresh itoa v0.4.1
       Fresh cmake v0.1.31
       Fresh unicode-bidi v0.3.4
       Fresh proc-macro2 v0.3.8
       Fresh crossbeam-utils v0.2.2
       Fresh log v0.4.1
       Fresh arrayvec v0.4.7
       Fresh time v0.1.40
       Fresh num_cpus v1.8.0
       Fresh atty v0.2.10
       Fresh rand v0.4.2
       Fresh lodepng v2.1.5
       Fresh itertools v0.7.8
       Fresh textwrap v0.9.0
       Fresh inflate v0.4.2
       Fresh deflate v0.7.18
       Fresh petgraph v0.4.12
       Fresh num-traits v0.2.4
       Fresh idna v0.1.4
       Fresh quote v0.5.2
       Fresh crossbeam-epoch v0.3.1
       Fresh matrixmultiply v0.1.14
       Fresh serde v1.0.58
       Fresh clap v2.31.2
       Fresh dreammaker v0.1.0 (file:///mnt/d/Spess/spacemandmm/src/dreammaker)
       Fresh libz-sys v1.0.18
       Fresh num-integer v0.1.38
       Fresh num-complex v0.1.43
       Fresh num-traits v0.1.43
       Fresh url v1.7.0
       Fresh syn v0.13.11
       Fresh crossbeam-deque v0.2.0
       Fresh serde_json v1.0.17
       Fresh libgit2-sys v0.7.1
       Fresh chrono v0.4.2
       Fresh num-iter v0.1.37
       Fresh ndarray v0.11.2
       Fresh structopt-derive v0.2.8
       Fresh serde_derive v1.0.58
       Fresh rayon-core v1.4.0
       Fresh git2 v0.7.1
       Fresh png v0.12.0
       Fresh structopt v0.2.8
       Fresh rayon v1.0.1
   Compiling cli v0.1.1 (file:///mnt/d/Spess/spacemandmm/src/cli)
       Fresh dmm-tools v0.1.0 (file:///mnt/d/Spess/spacemandmm/src/tools)
     Running `rustc --crate-name build_script_build src/cli/build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=fb66a4a7be4e1a12 -C extra-filename=-fb66a4a7be4e1a12 --out-dir /mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12 -L dependency=/mnt/d/Spess/spacemandmm/target/release/deps --extern chrono=/mnt/d/Spess/spacemandmm/target/release/deps/libchrono-537fc8bb477c5037.rlib --extern git2=/mnt/d/Spess/spacemandmm/target/release/deps/libgit2-53d7fb57b3656e9d.rlib -L native=/mnt/d/Spess/spacemandmm/target/release/build/libgit2-sys-beb272348ac1b655/out/lib`
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build0-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build1-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build10-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build11-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build12-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build13-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build14-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build15-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build2-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build3-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build4-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build5-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build6-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build7-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build8-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.build_script_build9-1adf3fd2abdac8ad2c8ab66eb016dac7.rs.rcgu.o" "-o" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12" "/mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12/build_script_build-fb66a4a7be4e1a12.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/mnt/d/Spess/spacemandmm/target/release/deps" "-L" "/mnt/d/Spess/spacemandmm/target/release/build/libgit2-sys-beb272348ac1b655/out/lib" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/mnt/d/Spess/spacemandmm/target/release/deps/libgit2-53d7fb57b3656e9d.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/liblog-795fd80930d2fd96.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libcfg_if-c3e9c7d873f54c91.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libbitflags-9588614b9b60af2d.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/liblibgit2_sys-a8005e45d9381c9b.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/liblibz_sys-eecc0ed3dffd6841.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/liburl-760974e3e74619d5.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libpercent_encoding-ba44e82b4019a23b.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libidna-8be6b3b89fab7161.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libunicode_normalization-cd4103b932d2c865.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libunicode_bidi-b7c6eeb36d28c8bd.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libmatches-c1d7cc58739e03a9.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libchrono-537fc8bb477c5037.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libnum_integer-def4329170a268ca.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libnum_traits-9bf07d9243831d05.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/libtime-f8983a3eb403fe08.rlib" "/mnt/d/Spess/spacemandmm/target/release/deps/liblibc-0f646ecdb2629fd9.rlib" "-Wl,--start-group" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-0cce0e0e34e933aa.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-7bed87070cafeede.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-e76963fdf0c94daa.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-8cd3b0417a81fb26.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-387bd949d1b36a91.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-453d825a151d7dec.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-5235bf36189564a3.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5725e7f9b84bd931.rlib" "-Wl,--end-group" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-874d313336916306.rlib" "-Wl,-Bdynamic" "-l" "z" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
  = note: /usr/bin/ld: cannot find -lz
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: Could not compile `cli`.

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build src/cli/build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=fb66a4a7be4e1a12 -C extra-filename=-fb66a4a7be4e1a12 --out-dir /mnt/d/Spess/spacemandmm/target/release/build/cli-fb66a4a7be4e1a12 -L dependency=/mnt/d/Spess/spacemandmm/target/release/deps --extern chrono=/mnt/d/Spess/spacemandmm/target/release/deps/libchrono-537fc8bb477c5037.rlib --extern git2=/mnt/d/Spess/spacemandmm/target/release/deps/libgit2-53d7fb57b3656e9d.rlib -L native=/mnt/d/Spess/spacemandmm/target/release/build/libgit2-sys-beb272348ac1b655/out/lib` (exit code: 101)

The colon access operator doesn't parse

The biggest cause of proc parse failures due to is_type_in_typecache using the : operator. The big problem is that a : b and a:b are different and need to be treated differently.

Prefabs need to accept nonspaced path operators only:

  • thing ? /obj : /mob is (thing) ? (/obj) : (/mob)

Field accesses need to accept nonspaced operators only:

  • thing ? a : b():c is (thing) ? (a) : (b():c)
  • thing ? a:b() : c is (thing) ? (a:b()) : (c)

But note that:

  • thing?1:2 is valid
  • thing?a:b is not

Fails to compile

Fails to compile with no such file or directory at https://github.com/SpaceManiac/SpacemanDMM/blob/master/src/qt-extras/glium_widget.rs#L134

Additonally, after adding include() and using cpp_build::Config in build.rs, there are multiple include errors as Qt doesn't have .h suffix on header files. After that, build fails with...

error[E0277]: the trait bound `widgets::opengl_widget::OpenGLWidget: cpp_utils::StaticCast<widgets::opengl_widget::OpenGLWidget>` is not satisfied
  --> src/qt-extras/glium_widget.rs:44:21
   |
44 |         CppBox::new(::cpp_utils::static_cast_mut(GliumWidget_new(Box::into_raw(boxed))))
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `cpp_utils::StaticCast<widgets::opengl_widget::OpenGLWidget>` is not implemented for `widgets::opengl_widget::OpenGLWidget`
   |
   = help: the following implementations were found:
             <widgets::opengl_widget::OpenGLWidget as cpp_utils::StaticCast<widgets::<unnamed>::paint_device::PaintDevice>>
             <widgets::opengl_widget::OpenGLWidget as cpp_utils::StaticCast<widgets::<unnamed>::object::Object>>
             <widgets::opengl_widget::OpenGLWidget as cpp_utils::StaticCast<widgets::widget::Widget>>
   = note: required because of the requirements on the impl of `cpp_utils::StaticCast<widgets::opengl_widget::OpenGLWidget>` for `glium_widget::GliumWidget`
   = note: required by `cpp_utils::static_cast_mut`

Spurious complaints about "unregistered"

Hovering the cursor within files which are unticked, or ticked but the environment has not yet been reloaded, or .dmm files regardless of tick status, spam error messages about the file being unregistered. The language server should either return an empty result set or use the final preprocessor state to annotate.

[Error - 09:58:48] Request textDocument/hover failed.
   Message: unregistered: _maps\shuttles\ruin_pirate_cutter.dmm
   Code: -32600 

`proc` relpath blocks in a codebase cause cascading errors

To reproduce:

/datum/dummy
    proc
        hello()

In contemporary SS13 codebases, this can be found to cause many "nested absolute path" warnings and several "proc looks like a var" errors. (Tested on both paracode and tgstation)

This appears to have been introduced within the past 24 hours of commits.

Fails to compile dreammaker

   Compiling dreammaker v0.1.0 (file:///usr/src/spacemandmm/src/dreammaker)
error[E0658]: use of unstable library feature 'entry_or_default' (see issue #44324)
   --> src/dreammaker/parser.rs:467:67
    |
467 |                             self.module_docs.entry(location.file).or_default().push((location.line, dc));
    |                                                                   ^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `dreammaker`.

To learn more, run the command again with --verbose.

Editor: Can't use ctrl mouse movement on macOS

On macOS, the functions of control and the super key (Command) are reversed in most cases.

Control+mouse wheel is bound for an OS-level zoom function, which conflicts with the horizontal movement of the editor.

Most of the other control-bound keys do work though.

Also, shift-mouse wheel seems to be broken too but I'm not sure what's up with that.

Parser isn't aware of text macros

It would be nice for SpacemanDMM to be able to understand text macros.
The use case I'm interested in is detecting instances of this bug, which I've run into recently, and Lummox said he's not going to fix.

cargo install

Downloading and installing via cargo install dmm-tools would be nice.

Suggestion: Bay-based fancy rendering

Request/Suggestion:

Currently when rending maps based off baycode, it just generates the in-editor version, which means non-transparent space, markers showing, cables showing, consoles off, etc.

Any way this can be fixed?

Can't parse braces in for loops expressions

/proc/a()
	for({var/i=0},i<10,i++)
		world.log << 1
/proc/b()
	for(var/i=0,{i<10},i++)
		world.log << 1
/proc/c()
	for(var/i=0,i<10,{i++})
		world.log << 1
line 2, column 6:
error: for-in-list must start with variable

line 5, column 14:
error: got '{', expected one of: operator, term, ',', ';', ')'

line 8, column 19:
error: got '{', expected one of: var, return, throw, operator, term, ')'

Output from "dmm-tools check" is just wrong

Running SpacemanDMM 9b0c9c8 against vgstation-coders/vgstation13@006ce38

Click me
dmm-tools check
parsing vgstation13.dme
__DEFINES/planes+layers.dm, line 94, column 10:
warning: macro redefined: HOLOMAP_LAYER

__DEFINES/planes+layers.dm, line 79, column 10:
info: previous definition of HOLOMAP_LAYER

__DEFINES/reagents.dm, line 190, column 9:
warning: macro redefined: RUM

__DEFINES/reagents.dm, line 188, column 9:
info: previous definition of RUM

__DEFINES/reagents.dm, line 250, column 9:
warning: macro redefined: CHANGELINGSTING

__DEFINES/reagents.dm, line 220, column 9:
info: previous definition of CHANGELINGSTING

__DEFINES/setup.dm, line 770, column 9:
warning: macro redefined: BRUTE

__DEFINES/setup.dm, line 610, column 9:
info: previous definition of BRUTE

__DEFINES/setup.dm, line 771, column 9:
warning: macro redefined: BURN

__DEFINES/setup.dm, line 611, column 9:
info: previous definition of BURN

__DEFINES/setup.dm, line 772, column 9:
warning: macro redefined: TOX

__DEFINES/setup.dm, line 612, column 9:
info: previous definition of TOX

__DEFINES/setup.dm, line 773, column 9:
warning: macro redefined: OXY

__DEFINES/setup.dm, line 613, column 9:
info: previous definition of OXY

__DEFINES/setup.dm, line 774, column 9:
warning: macro redefined: CLONE

__DEFINES/setup.dm, line 614, column 9:
info: previous definition of CLONE

__DEFINES/setup.dm, line 775, column 9:
warning: macro redefined: HALLOSS

__DEFINES/setup.dm, line 615, column 9:
info: previous definition of HALLOSS

__DEFINES/setup.dm, line 777, column 9:
warning: macro redefined: STUN

__DEFINES/setup.dm, line 618, column 9:
info: previous definition of STUN

__DEFINES/setup.dm, line 778, column 9:
warning: macro redefined: WEAKEN

__DEFINES/setup.dm, line 619, column 9:
info: previous definition of WEAKEN

__DEFINES/setup.dm, line 779, column 9:
warning: macro redefined: PARALYZE

__DEFINES/setup.dm, line 620, column 9:
info: previous definition of PARALYZE

__DEFINES/setup.dm, line 780, column 9:
warning: macro redefined: IRRADIATE

__DEFINES/setup.dm, line 621, column 9:
info: previous definition of IRRADIATE

__DEFINES/setup.dm, line 781, column 9:
warning: macro redefined: STUTTER

__DEFINES/setup.dm, line 623, column 9:
info: previous definition of STUTTER

__DEFINES/setup.dm, line 783, column 9:
warning: macro redefined: EYE_BLUR

__DEFINES/setup.dm, line 624, column 9:
info: previous definition of EYE_BLUR

__DEFINES/setup.dm, line 784, column 9:
warning: macro redefined: DROWSY

__DEFINES/setup.dm, line 625, column 9:
info: previous definition of DROWSY

__DEFINES/setup.dm, line 1204, column 9:
warning: macro redefined: DAMAGE_LAYER

__DEFINES/planes+layers.dm, line 211, column 10:
info: previous definition of DAMAGE_LAYER

__DEFINES/setup.dm, line 1338, column 2:
error: unknown directive: #warning, did you mean #warn

__DEFINES/setup.dm, line 1348, column 1:
error: unknown directive: #warning, did you mean #warn

__DEFINES/setup.dm, line 1359, column 7:
error: got '*', expected one of: newline, '/', identifier

It claims HOLOMAP_LAYER is defined on line 94, but it's actually defined on line 98:
https://github.com/vgstation-coders/vgstation13/blob/006ce38c3d023872c1c9594087ce8348b814184e/__DEFINES/planes%2Blayers.dm#L98
it also claims it's defined twice, on line 79, but it isn't
https://github.com/vgstation-coders/vgstation13/blob/006ce38c3d023872c1c9594087ce8348b814184e/__DEFINES/planes%2Blayers.dm#L79

It's not just a case of wrong line numbers, I can't actually find any redefinition.

All of these warnings and the one error at the end seem to be wrong.

Doesn't compile

error: expected pattern, found reserved keyword `proc`
   --> src/dreammaker/objtree.rs:240:25
    |
240 |             if let Some(proc) = ty.get().procs.get(name) {
    |                         ^^^^

error[E0658]: underscore lifetimes are unstable (see issue #44524)
   --> src/dreammaker/parser.rs:613:53
    |
613 |                     let mut subparser: Parser<'ctx, '_, _> = Parser::new(self.context, body_tt.iter().cloned());
    |                                                     ^^

error: aborting due to 2 previous errors

error: Could not compile `dreammaker`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Command ran: cargo build -p dm-langserver

Language server panic on non-ascii characters

dm-langserver 0.0.1  Copyright (C) 2017-2018  Tad Hardesty
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under the conditions of the GNU
General Public License version 3.

executable: D:\projects\vscode\langserver-deploy\local.exe
commit: fae911a7085470f188e62250870975133caed855
build date: 2018-09-15UTC
directory: d:\projects\tgstation-upstream
workspace root: d:\projects\tgstation-upstream
environment: d:\projects\tgstation-upstream\tgstation.dme
parsed in 4.846s
Notify NYI: workspace/didChangeConfiguration => Object({"settings": Object({"dreammaker": Object({"autoUpdate": Bool(true), "byondPath": String("c:\\Downloads\\Games\\byond"), "langserverPath": String("D:/projects/vscode/langserver-deploy/local.exe"), "maxProblems": Number(100), "tickOnCreate": Bool(true)})})})
"MAP_REMOVE" -> Some(Anything("map_remove"))
    1 results in 0.016s
"multitool_act" -> Some(Anything("multitool_act"))
    1 results in 0.016s
"power" -> Some(Anything("power"))
    140 results in 0.017s
"copytext" -> Some(Anything("copytext"))
    2 results in 0.028s
thread 'main' panicked at 'assertion failed: self.is_char_boundary(n)', liballoc\string.rs:1555:30
stack backtrace:
   0: std::sys::windows::backtrace::unwind_backtrace
             at C:\projects\rust\src\libstd\sys\windows\backtrace\mod.rs:95
   1: std::sys_common::backtrace::print
             at C:\projects\rust\src\libstd\sys_common\backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at C:\projects\rust\src\libstd\panicking.rs:211
   3: std::panicking::default_hook
             at C:\projects\rust\src\libstd\panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at C:\projects\rust\src\libstd\panicking.rs:475
   5: std::panicking::continue_panic_fmt
             at C:\projects\rust\src\libstd\panicking.rs:390
   6: std::panicking::rust_begin_panic
             at C:\projects\rust\src\libstd\panicking.rs:325
   7: core::panicking::panic_fmt
             at C:\projects\rust\src\libcore\panicking.rs:77
   8: core::panicking::panic
             at C:\projects\rust\src\libcore\panicking.rs:52
   9: alloc::string::String::replace_range<core::ops::range::Range<usize>>
             at \<panic macros>:3
  10: dm_langserver::document::DocumentStore::change
             at D:\projects\SpacemanDMM\src\langserver\document.rs:71
  11: dm_langserver::Engine<dm_langserver::io::StdIo, dm_langserver::io::StdIo>::handle_call<dm_langserver::io::StdIo,dm_langserver::io::StdIo>
             at D:\projects\SpacemanDMM\src\langserver\main.rs:438
  12: dm_langserver::Engine<dm_langserver::io::StdIo, dm_langserver::io::StdIo>::run<dm_langserver::io::StdIo,dm_langserver::io::StdIo>
             at D:\projects\SpacemanDMM\src\langserver\main.rs:403
  13: dm_langserver::main
             at D:\projects\SpacemanDMM\src\langserver\main.rs:61
  14: std::rt::lang_start::{{closure}}<()>
             at C:\projects\rust\src\libstd\rt.rs:74
  15: std::panicking::try::do_call<closure,i32>
             at C:\projects\rust\src\libstd\panicking.rs:310
  16: panic_unwind::__rust_maybe_catch_panic
             at C:\projects\rust\src\libpanic_unwind\lib.rs:105
  17: std::rt::lang_start_internal
             at C:\projects\rust\src\libstd\rt.rs:58
  18: std::rt::lang_start<()>
             at C:\projects\rust\src\libstd\rt.rs:74
  19: __scrt_common_main_seh
             at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:259
  20: BaseThreadInitThunk
  21: RtlUserThreadStart
[Info  - 9:52:46 PM] Connection to server got closed. Server will restart.

Compilation fails on valid .dm

https://github.com/MoreRobustThanYou/tgstation/blob/bf68d4f25237906beceaa006c035ae2f8104e940/code/modules/spacepod/spacepod_construction.dm#L131

DM will compile this but dmm-tools won't

12:09:58 PM: Unhandled exception in payload processing! Action: pull_request, Error:
System.AggregateException: Generation errors occurred! Repo: Octokit.User/tgstation, PR: [READY] Spacepods! (#34047) Base: eb083410c931b030f3f8a47f25bbfd894e66f423 (tgstation:master), HEAD: bf68d4f25237906beceaa006c035ae2f8104e940 ---> MapDiffBot.Generator.GeneratorException: dmm-tools.exe exited with error code 101!
Command line: diff-maps "S:\Website\Cyberbot\App_Data\Requests\MapDiffs\Repositories\tgstation\tgstation\_maps/map_files/BoxStation/BoxStation.dmm.old_map_diff_bot" "S:\Website\Cyberbot\App_Data\Requests\MapDiffs\Repositories\tgstation\tgstation\_maps/map_files/BoxStation/BoxStation.dmm"
Output:

parsing tgstation.dme

code\modules\spacepod\spacepod_construction.dm, line 131, column 8:
got Punct(Comma), expected one of: list element, unary operator, term


Error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DMError { location: Location { file: 2258, line: 131, column: 8 }, desc: "got Punct(Comma), expected one of: list element, unary operator, term" }', src\libcore\result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

VSCode langserver bluescreens Windows 10 18875.1000

After updating Windows to 18875.1000, upon starting the langserver, my PC would immediately bluescreen for either PAGE_FAULT_IN_NONPAGED_AREA or KERNEL_SECURITY_CHECK_FAILURE.

After disabling the langserver extension, I could edit files.

I have no idea what causes this, but it happens anyway
image

I blame the windows 10 beta

Rendering error - MapDiffbot

When writing a report, it said that "Note that inconsistencies/errors in renderings should be reported on the upstream repository: https://github.com/SpaceManiac/SpacemanDMM " so here you go.

Error: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> MySql.Data.MySqlClient.MySqlException: Error submitting 20MB packet; ensure 'max_allowed_packet' is greater than 20MB. ---> System.Net.Sockets.SocketException: Broken pipe
   at MySqlConnector.Utilities.SocketAwaitable.GetResult() in C:\projects\mysqlconnector\src\MySqlConnector\Utilities\SocketAwaitable.cs:line 30
   at MySqlConnector.Protocol.Serialization.SocketByteHandler.<WriteBytesAsync>g__DoWriteBytesAsync|7_0(ArraySegment`1 data_) in C:\projects\mysqlconnector\src\MySqlConnector\Protocol\Serialization\SocketByteHandler.cs:line 107
   at MySqlConnector.Utilities.ValueTaskExtensions.ContinueWith[T,TResult](ValueTask`1 valueTask, Func`2 continuation) in C:\projects\mysqlconnector\src\MySqlConnector\Utilities\ValueTaskExtensions.cs:line 8
   at MySqlConnector.Utilities.ValueTaskExtensions.ContinueWith[T,TResult](ValueTask`1 valueTask, Func`2 continuation) in C:\projects\mysqlconnector\src\MySqlConnector\Utilities\ValueTaskExtensions.cs:line 8
   at MySqlConnector.Core.ServerSession.TryAsyncContinuation(Task`1 task) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ServerSession.cs:line 1225
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at MySqlConnector.Core.TextCommandExecutor.ExecuteReaderAsync(String commandText, MySqlParameterCollection parameterCollection, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 36
   --- End of inner exception stack trace ---
   at MySqlConnector.Core.TextCommandExecutor.ExecuteReaderAsync(String commandText, MySqlParameterCollection parameterCollection, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 49
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(DbContext _, ValueTuple`2 parameters, CancellationToken cancellationToken)
   at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IReadOnlyList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at MapDiffBot.Core.PayloadProcessor.HandleResults(PullRequest pullRequest, Int64 checkRunId, Dictionary`2 diffResults, IServiceScope scope, CancellationToken cancellationToken) in /src/MapDiffBot/PayloadProcessor.cs:line 683
   at MapDiffBot.Core.PayloadProcessor.GenerateDiffs(PullRequest pullRequest, Int64 checkRunId, IReadOnlyList`1 changedDmms, IServiceScope scope, CancellationToken cancellationToken) in /src/MapDiffBot/PayloadProcessor.cs:line 620
   at MapDiffBot.Core.PayloadProcessor.ScanPullRequestImpl(Int64 repositoryId, Int32 pullRequestNumber, IServiceScope scope, CancellationToken cancellationToken) in /src/MapDiffBot/PayloadProcessor.cs:line 199

PR with error: vgstation-coders/vgstation13#21067

Langserver panics after attempting to autocomplete new define

Langserver panics and spams error (#55) upon attempting to autocomplete a new define. After the panic, autocomplete now recognises the define and works properly.

#define MATERIAL_MAHOGANY "mahogany"

/turf/simulated/wall/wood/New(var/newloc)
	..(newloc,MATERIAL_WOOD)

/turf/simulated/wall/mahogany/New(var/newloc)
	..(newloc,MATERIAL_MAHOGANY)

Complete steps I take to reproduce:

  1. Create new define (MATERIAL_MAHOGANY)
  2. Copy-paste existing obj (in this case, .../wall/wood/New)
  3. Double-click MATERIAL_WOOD to select text
  4. Type M to begin autocompleting MATERIAL
  5. Panic

Can't parse ()

world/New()
	return (0 ? 1 : ())

line 2, column 19:
error: got ')', expected one of: operator, term

Apparently that's valid DM and it does nothing. Actually found in the wild here.

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.