* Implementation
* wip testing
* allow setting held weight mod to long value
* more tests
* address github actions warnings
- unary minus operator applied to unsigned type, result still unsigned
* Add docs, core-changes
* fix GetItemDescriptor() for HeldWeightMultiplierMod; update tests
* update docs a bit more
* Remove mod suffix
* Add item.weight_multiplier_mod
* Add test for item.weight_multiplier_mod
* add core-changes and docs
* Address review comments
- Use `Clib::clamp_convert`
- Remove new `weight_of` function
* Add libefsw at 3419347
* saving work
* some cleanup
* move to fs::paths
* saving work.. maybe hitting a limit with number of watched dirs?
* migrate to watching only ecompile.cfg specified folders, cleanup/doc
* Display summary between compilations in watch mode; fix cache reuse
* Fix inf loop; some cmake, format changes...
* some windows compilation fixes... tweaks to windows cmake?
* Update Efsw.cmake for build lib changes
* removed debug flag
* silence efsw build
dont add antlr project if it already exists
* Address review comments:
- use std::move on efswwatcher add_*
* add docs
* Add WatchModeByDefault ecompile.cfg option
* iniital work on tests
* Add CI actions
* some changes (passes locally on win, mac, linux)
* Fix fixtures dependency; use ecompile verbose mode
* Add core-changes
* Send ctrl+c instead of killing process
* Proper Python file naming
* Kill ecompile process on windows, SIGINT otherwise
---------
Co-authored-by: turleypol <turley@polserver.com>
* Squash only prettify changes from escript_formating_try
* support of "format-off" / "format-on" comments to mark areas without
formatting
* fix typo
* added FormatterIdentLevel, FormatterMergeEmptyLines cfg entry
better line splits for dicts/arrays
* added several spacing options. the current setting list is now:
//LineWidth
FormatterLineWidth 80
// keep original keyword spelling
FormatterKeepKeywords 0
// number of spaces for ident
FormatterIdentLevel 2
// multiple newlines get merged to a single
FormatterMergeEmptyLines 1
// space between emtpy parenthesis eg foo() vs foo( )
FormatterEmptyParenthesisSpacing 0
// space between emtpy brackets eg struct{} vs struct{ }
FormatterEmptyBracketSpacing 0
// space after/before parenthesis in conditionals
// eg if ( true ) vs if (true)
FormatterConditionalParenthesisSpacing 1
// space after/before parenthesis
// eg foo( true ) vs foo(true)
FormatterParenthesisSpacing 1
// space after/before brackets
// eg array{ true } vs array{true}
FormatterBracketSpacing 1
// add space after delimiter comma or semi in for loops
// eg {1, 2, 3} vs {1,2,3}
FormatterDelimiterSpacing 1
// add space around assignment
// eg a := 1; vs a:=1;
FormatterAssignmentSpacing 1
// add space around comparison
// eg a == 1 vs a==1
FormatterComparisonSpacing 1
// add space around operations
// eg a + 1 vs a+1
FormatterOperatorSpacing 1
// use \r\n as newline instead of \n
FormatterWindowsLineEndings 0
* added tab support
// use tabs instead of spaces
FormatterUseTabs 0
// tab width
FormatterTabWidth 4
* extended example ecompile.cfg with formatter settings
* cleanup
* program args comma is optional...
fixed line comments in group splitting
* since tokenids are now correct no more guessing for linecomments needed
* comments use as start tokenid the whitespace token if its on the same
line
* splitted processing from linebuilding
* renamed TokenPart to FmtToken better matches the purpose.
Comments get directly stored as FmtToken
started with a context enum
* better(?) formatting for groups
* fix eof rawlines
added check that all comments/rawlines got parsed
* const correctness
* datatype adapted to antlr
* fixed warnings
* added InsertNewlineAtEOF
* add newline at the end if the original file had one
dont strip comment whitespace if its somejind of "header block"
use the defined lineending for /* */ comments
* docs
* \r\n is default on windows \n otherwise
* fixed warning
---------
Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
* Update grammar; add tests
String literals inside an interpolated string cannot start with `}`, as it must be a DOUBLE_RBRACE `}}`
* Fix interpolate string token reading
* Update core-changes
* every 3rd party lib is now excluded from "all" build, meaning it gets
only build when actually used.
removed the cmake option to partially build, due to the above changes
this is no more needed, just build the target
streamlined 3rdparty target names, they all start with lib now
* renamed escriptgrammar target to escriptgrammar_codegen for
clarification
fixed dependency name
* corrected sources name
* readded missing include
* Add cppdap debugger library and simple server (#508)
* Add cppdap library
* Add cppdap server
* fixup cmake scripts for windows
* Enable caching of cppdap on GitHub actions
* Fix CMake for cppdap target
* Wait 1s for session close before thread ends
* Address review comments
- Remove unnecessary use of wait_for
- Fix wait_for method
* Do not use SocketClientThread for cppdap clients
* Address review comments
- Cleanup object ownership
* Add authorization and event handling (#510)
* Add authorization and event handling [WIP]
* Use std::weak_ptr; Only allow one debugger conn
* Only attach debugger if dbg file exists
* Cleanup weak_ptr; Fix listeners; Add handler stubs
* Address review comments
- PolLock on uoexec and weakptr access
- Use make_shared when creating client thread
* Add ExecutorDebugListener on_destroy callback
* Use cppdap sockets instead of clib sockets
* Update cppdap repository to 2703cf4
* Implement server address binding
* Update cppdap repository to eeca5ce
* Fix warnings
* Use weak_from_this
* Fix stalled executors on disconnect
* Fix stalled executors on re-attach
* Clear uoexec weakptr on all debugger detaches
* Move server to gamestate
* move DapDebugServer into Network namespace
* move DapDebugServer into GameState for storage
* Move DapDebugServer into NetworkManager
* Fix missing memory include
* Add more events (#513)
* Add more events
* Implement dbg_step_out
* Fix breakpoint clearing
* Add even more events (#515)
* add launch request
* Add custom `processes` command
* fixup loop
* Refactoring to move handlers to member functions
* Add VariablesRequest and ScopesRequest
* use std::varaint for Handles
* add pollocks
* refactor Handles to new file
* move custom messages to proto.h
* move clientthread
* some formatting / cleanup
* Add missing PolLock
* move dap variables creation to Handles
* appobj members
* rename ClientThread to DebugClientThread
* rename LaunchRequest args to arg
* Fix compiler error on size_t
* Add support for EvaluateRequest and SetVariableRequest (#519)
* Update grammar for evaluateUnit
* Cleanup various compiler code
* Add support for EvaluateRequest
Only supports values, variables, element access, member access
* Add report clearing to reinitialize state
* Add support for SetVariableRequest
* Fix CI build errors
* Move ExpressionEvaluator to Bscript
* Fix formatting
* Fix include
* Refactor global and frame variable references
* Encapsulate Executor debugging environment; Fix step over (#524)
* Fix step over
* Some cleanup of executor
- Remove unused debug states
- Rename members for consistency
* move debugging environment to new class
* Move instruction inspection to class
* Cleanup slashes on Windows; Add Executor state to processes response (#527)
* Fix backspaces in script names on Windows
* Fix compilation warnings with data loss
* Use boost::icontains for string comparison
* Add Executor state to processes response
* Updates for libfmt
* Fix tests; Fix cppdap build for Mac universal binary (#607)
* fix tests
* fix cppdap build for mac universal binary
* Update cppdap to 2a4c7cf
* Add tests; Modify launch behavior to not stop at entry (redo) (#609)
* Remove unused setExceptionBreakpoints handler
* Add debugger tests
* Launching a script should not set attaching state
* Add launch tests
* Do not check for connection in debugger tests
* Rename `program` to `script` in protocol structs
* Fix launch stopAtEntry; quote string var values
* Fix compilation error on Windows
* Add configfiles doc entry
* Various fixes for finishing touches; Add core-changes (#610)
* switch cmake projects
* simple docs
* cmake move make_directory
* Fix launch request with relative, absolute, package paths
* make relative paths as absolute in source request
* Add true, false, uninit to ExpressionEvaluator
* Re-add setExceptionBreakpoints to avoid unhandled message errors
* Better debug thread logging with instance numbers
* launched scripts should terminate on disconnect (according to DAP spec)
* Properly handle exited event in client thread
* Add core-changes
* Address Discord comments
- Mention vscode-escript in core-changes
- Re-add "cppdap already built" in cmake
* change cmake escriptgrammarlib visibility to public
* added explicit targets for every 3rd party lib
these contain include dirs/libs/compiler defs
* moved each 3rd party lib into a version folder, to give each target a
dedicated include directory.
Now noone should add lib root folder as include dir
Used private linking where possible
disabled building of boost, wasnt used at all
* regnerate boost cache
adapted targets for coverity
* rewrite of saving, replaced operator way with a generic add method, thus
not everywhere the formating of the savefiles is hardcoded.
since its the last spot which uses the old formating lib, remobed the
lib
* removed cmake of old format lib
* testscripts for load/save of UObject,Item,Armor,Weapon
* fixed: member faster_cast_recovery and faster_cast_recovery_mod getter returned
a wrong value
* wrong/missing docs
* test containers, lockable, map, spellbooks
fixed save bug in map and spellbook
removed ancient savestrategy experiments
* added corpse test
splitted testfiles
* fixed loading (ancient bug) and saving (PR bug) of Reportables
added tests for houses, boats, accounts and chars
* fixed include
* fix shutdown leak
* added npc tests
upload complete coretest folder also on failure
* do not write and load RegisteredHouse for NPCs two times
readded extra newline between accounts
* tests for guild, party, realm
added resource cfgs, but a test is not really possible since nothing of
interest is stored
* added datafile, storage test
* activated resource loading, 25year old bug, but since the stored values
are senseless it makes no real difference.
added a few wtf comments
catch all exceptions during formatting of log lines
* replaced .write with explixit .begin, .end and .comment.
for leftovers.txt the StreamSaver was also used, since the format is
different use directly ofstream
* added corechanges
* POLLOG* macros use the new formatting
removed all old logging functions
* removed old fmt lib from everything except StreamWriter
removed unneeded functions
* fixed review comments
* Buffs: should be now possible to set for the first cliloc arguments,
added chr.buffs member to return the current buffs
* added test
* docs
* more docs
* renamed include guard to be able to use both format lib versions in
parallel
* build Fmt lib and link it into clib
* use std::string instead of format Writer for logging
added variant "2" for logging with new fmt lib
* use new logging variant for two logs
* always add \n to flush log, lets see if the assumption holds
* use new lib for tostring
* replaced all INFO_PRINTS in clib
* formatter for Token, BObject and BObjectImp
* started with bsccript
* use function instead of actual object for logging
* remaining bscript, started plib
* logvariant without newline added, more template magic
* format support for base types, added test for format padding
new version for fdump
* chanhed ecompile/runecl fixed compilation with ESCRIPT_PROFILE
* rewrite INFO_PRINT in plib,poltool/uoconvert/uotool
* replaced remaining INFO_PRINTS, renamed macros INFO_PRINT for logging
without newline, INFO_PRINTLN for newline addition.
Replaced also INFO_PRINT_TRACE and renamed it to INFO_PRINTLN_TRACE
* gitignore for fmt lib
* cleanup vim leftovers
* Fix unhandled exception in UBoat::create_component
* Return 0 on unsuccessful boat move with MoveBoat and MoveBoatRelative
* Add boat.set_alternate_multiid
* skip base multiid in alternates boat struct
* Add test for boat.set_alternate_id
* docs, core-changes
* use array equals in test
* Initial work on boat piloting changes
- Changed: Boat script is now registered as the boat's control script
- Added: Boat piloting via mouse movement
- Added: boatRef.pilot member
- Added: boatRef.pilot([charRef]) method
* add first test
* Fix boat control script attach on scripted create
* move boat move packet warnings to suspicious acts
* set pilot now errors when mutli has no process
* Add test, testclient support for boat move packet
* Touchup pilot members and methods
- Change `pilot` method to `setpilot`. This standarizes it a bit with
the same naming convention of `npc.setmaster`.
- Fix return values in `pilot` member, returning `0` if no pilot.
* Refactor to put functionality inside UBoat
* Address Discord comments
- Remove SuspecisionActs for no boat process.
- Add `relative_direction` to boat move sysevent.
* destroy boatmount on chr death; more error checks
* Fix compilation after master merge
* Fix relative_direction calculation
* wip tests
* Fix boat tests
* Address review comments
- Initialize UBoat::mountpiece
* Add HSA check to boat.setpilot
* Reject movement if boat mountpiece equipped
* docs; test cleanup
* add test for blocked movement
* Address Discord review comments
- Add suspicious acts notice for client movement while piloting
- Return error on attempting to script move a char that is piloting a boat
* Fix compiler warning
* use std::to_chars for doubles
* fixed cmake errors when an escript error occurs
* macos 13 with clang15
* CI: macos new cache version
* guessing game
* guess no2
* test shipped clang with deloytarget env
* adapted testdata, lets see if all platforms behave the same
* explicit test if high precision double can get packed+unpacked
* log testclient receive buffer on error
* added docs
* add item.character_owner
* Address review comments
- Cleanup chr_from_wornitems
- Return BError if no character owner
* Add Target option TGTOPT_ALLOW_NONLOCAL
* Address review comments
- Remove `Core::chr_from_wornitems`
* Add pol tests for snooping
* Add tests for TGTOPT_ALLOW_NONLOCAL
* target_nonlocal_checklos pol test debugging
* target_nonlocal_checklos pol test debugging
- Remove destroy of obstacle
- Add a CheckLosAt call to error return
* target_nonlocal_checklos pol test debugging
- Enable USAN build
* undo test debugging changes
* use mobile for los when targetting snoopable items
* Update core-changes
* Persist SnoopScript for items on save
* Add snoop_script_ to Item::estimatedSize
* document SnoopScript script type
* Initial work on adding SnoopScript
* use message "That doesn't belong to you..." if lifting a snoopable item
* fix configfile changes
* Update core-changes
* Crash reproducer with methods
* potential crash fix
* removed ASan build, added core changes
* do not store valuestack reference before calling method to fix potential
dangling reference
* Take into account that the ValueStack can grow due to method calls.
* use std::filesystem to iterate over directories
realms folder can now contain files
* Ignore unix like hidden dir entries
* simplified recursive compilation
* Fix SetString packet hook method writing UTF-8 instead of CP-1252. Add a new method, SetUtf8String, for writing UTF-8.
* Add functions that operate on whole strings.
* Fix a couple of bugs and add unit tests.
* Do not convert if the string doesn't contain any UTF-8
* Convert 0x80..0x9f control characters, which don't exist in cp1252, to question marks
* Fix SetUtf8String writing too few bytes if the string contained multi-byte UTF-8 characters
* Remove extraneous parameter from TextCommandScript documentation
* Update changes and docs
* added escriptgrammar as external lib where it belongs. Silenced warnings.
* bscript compiler warning fixes
* special include file to get rid of gcc warnings about antlr4
* misc windows warnings
* time specifc warnings
* buildfix + apple warnings
* never trust apple
* windows debug build warnings
* some windows clang warnings
* last warning fix
* added os:GetEnvironmentVariable to list all environs or get a single one
* first version of restarting the core to test save/load
added environment variable to filter tests
* fixed string constructor (size_t instead of signed int)
* added string_view constructor
* splitted and extended restart tests
* added docs
* added pol.cfg setting to disallow environment variable access
* Change environmental variable access rules
Instead of defaulting to all values allowed, now defaults to none. May
specify either `*` to allow all variables, or a comma-delimited list.
* Address review changes
- Use Clib lower instead of boost
- const auto references
- Separate tests for access and finding env vars
* Update documentation
* Apply suggestions from code review
Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists
return 1 for success everything else is an error
* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing
* added support for used in critical scripts
* use weakptr instead of pid
moved keep_alive flag to uoexecutor
* Function and nethod accept now a argument list
* added docs
* missing docs
* faster shutdown time
* fixed typo
* fixed weird cornercase
* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript
* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set
* boat tests
* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api
* cleanuo scripts for boat and npc
* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted
* bypass windows specific ecompile.cfg logic
* fix for parallel execution
* on windows its called .exe ..
* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile
* configure ecompile.cfg to add absolute path
* early sleepms calls can lead to endless waiting
* Code coverage (#260)
* play with coverage reports
* fix yml
* use 0 as default for gcov cmake var
* fixed used cov version, hopefully fixed now cmake
* demangle function names
* removed debug msg
* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking
* added https://coveralls.io/github/polserver/polserver
* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds
* added storage tests..
docs need fixes, the Imps are not working at all
* fixed storage test to really move items
* added a house
corrected static/dynamic flag
created a few house tests
* updated yml file to new github api
* corrected coverage discord job name
* always put to runlist even if not necessary
* extended aos prop tests
* equip/unequip aos mod
* extra ci step for shard test fixtures and activated verbose shard test
* use extra ci step for all build configs, sorted testscripts for
execution
* fixed sorting
* added param to syslog to not print the context (cleaner testscript
visualization)
* added build targets for tests
* sleep api cleanup
* more aos property tests
* build for coveralls also on pullrequest
* readded debug state reset on schedule
* updated checkout ci action
* updated checkout in all ci runs