Releases: nao1215/libvalacore
Releases · nao1215/libvalacore
v0.10.0
Changed
- Breaking: standardized failure handling across major APIs to
Vala.Collections.Result<T, GLib.Error>. - Migrated APIs to
Result-based contracts across core namespaces, including:Vala.Time.CronVala.Config.AppConfigVala.Concurrent.SingleFlight,Channel,WorkerPool, andThreadPoolfactoriesVala.Net.Retry,RateLimiter, andCircuitBreakerconfiguration pathsVala.Distributedhashing/snowflake helpersVala.Math(BigDecimal,BigInteger,Random,Math)Vala.Lang(Context,Exceptions,Preconditions,Randoms)Vala.Archive(Tar,Zip)Vala.Compress(Gzip,Zlib)Vala.Encoding(Base64,Hex,Url,Csv,Json.must)Vala.Io(Console,Filesystem,Resource,FileLock,Watcher,Shell)Vala.Event.EventBusand selected collection helpers (ImmutableList,Stream,LruCache,BloomFilter,HyperLogLog)
- Result payload contracts were normalized for bool/int paths and tests were updated to use explicit
isOk()/unwrap()/unwrapError()checks. Vala.Config.AppConfignow trims keys consistently in all accessors, distinguishes load failures viaAppConfigError.LOAD_FAILED, and rejects unsafeappNameinputs inload.Vala.Concurrent.SingleFlight.doFuturenow reports failures with message, error domain, and code in a unified format.
Fixed
scripts/coverage.shsummary parsing now handles both integer and decimal line-coverage percentages robustly.Vala.Archive.Tar.extractFilenow:- extracts using the exact matched archive member spelling
- validates destination parent directory type/writability before write
- reports rollback failures when both
temp -> destmove and restore fail.
Vala.Net.RateLimiter.waitN/tryWaitNnow reject impossible requests (permits > burst) instead of risking indefinite wait behavior.Vala.Time.Cronbounded integer parsing now uses overflow-safe parsing before range checks.- Validation and error-classification fixes were applied across modules, including:
BloomFilter/HyperLogLogrejectingNaNBase64.decodeStringrejecting non-UTF-8 decoded payloads- corrected
Hex.decodelow-nibble error index reporting FileLock.acquireTimeoutzero-timeout immediate-success path- improved
FilesystemI/O cause propagation and TOCTOU-safe owner-change flow - precise not-found/I/O mapping in
Resource - whitespace-only input rejection in
NetUrl.
- Expanded regression coverage for Result migration edge cases (invalid arguments, overflow boundaries, rollback behavior, and concurrency contracts).
Documentation
- Updated README/inline examples for Result-based APIs, corrected signatures, and added migration guidance for legacy nullable/throw-style usage.
v0.9.1
Changed
Vala.Encoding.Json.mustpath validation was tightened and related query-path contract tests were expanded.Vala.Concurrent.Futurenow treats negative timeout/delay inputs as recoverable contract failures, with updated tests.Vala.Math.Math.factorialnow enforces the safeint64input range (0..20) with boundary coverage.Vala.Config.AppConfignow rejects whitespace-only keys.
Fixed
- Fixed duplicate
/concurrent/future/testTimeoutInvalidregistration inFuturetests. scripts/updateDoc.shand docs workflow copy logic now handle generated valadoc output paths more robustly.
Documentation
- Regenerated valadoc outputs to match current public API and behavior.
v0.9.0
No changelog entry found for version v0.9.0
Please check CHANGELOG.md for updates.
v0.8.0
Added
Vala.Validation.Validator- Fluent validation API withValidationResultand field-level errorsVala.Time.Cron- Interval/daily scheduling with cancellation supportVala.Event.EventBus- In-process pub/sub with sync and async dispatch modesVala.Io.FileTree- Recursive tree walk, search, copy/sync, and delete utilitiesVala.Crypto.Identifiers- Identifier helpers including UUID/ULID/KSUID generationVala.Io.WatcherandVala.Io.FileWatcher- File system watching with recursive and glob modesVala.Compress.GzipandVala.Compress.Zlib- Byte/file compression and decompression helpersVala.Archive.ZipandVala.Archive.Tar- Archive create/extract/list/update helpersVala.Encoding.Json- JSON value tree, query, immutable update, merge, flatten, and pretty-printVala.Net.Http- One-liner HTTP helpers and request builder with headers/auth/query/body utilitiesVala.Text.Template- Mustache-style template rendering with conditionals, loops, filters, and fallback valuesVala.Encoding.Xml- XML parse/serialize helpers with XPath-style queryVala.Encoding.Toml- TOML parse/query/stringify helpersVala.Encoding.Yaml- YAML parse/query/stringify helpers including multi-document parsing
Changed
- Expanded
README.mdAPI reference for newly added modules and types - Added/expanded Meson test targets for new modules
- Consolidated CI checks into a single workflow that runs configure/build/test/coverage in sequence
- Optimized
scripts/coverage.shfor CI reuse:- reuses existing coverage-enabled build artifacts by default
- supports
--skip-testto avoid duplicate test execution - captures coverage in a single
lcovpass overbuild/tests(with optional--parallelwhen available)
Fixed
Gzip/Zlibconverter loops no longer rebuild full tail buffers per iterationGzip.compressLevel/Zlib.compressLevelnow fail gracefully on invalid levels (empty byte array)Tar.createnow validates input before removing an existing destination archiveTar.createFromDirnow usestar -Cto preserve destination path semanticsTar.extractFilenow extracts to a temp file and atomically moves on success to avoid destination truncation on failureYamlflow mapping now preserves nested flow values ({}/[]) and handles commas inside quoted scalarsEventBusasync dispatch now uses boundedWorkerPoolinstead of per-handler thread creationEventBus.subscribeOncenow removes one-shot subscribers before dispatch to avoid duplicate delivery under concurrent publishHttptimeout conversion now validates milliseconds and avoids zero/overflowed socket timeoutsHttpresponse parser now validatesContent-Length/chunk sizes and supports chunk-size extensionsHttp.downloadnow streams response bodies directly to disk instead of loading full payloads in memoryToml.getIntOrnow guards int64-to-int narrowing overflowXmlparser now validates closing tag names, and serializer preserves mixed-content orderValidationResult.errors()andValidator.validate()now return defensive snapshotsValidator.validate()now resets validator internal state between runs, and field validation rejects whitespace-only names- Replaced shell-based recursive cleanup in tests with filesystem API helpers
- Synchronized shared counters in concurrency-sensitive tests (
EventBus,ThreadPool2,Cron) Yamlinline mapping values now parse as full nodes (not scalar-only), quoted escapes are decoded, andkey:value(no-space) flow pairs are acceptedYamlserializer now quotes strings with leading/trailing whitespace to preserve round-trip fidelityTarrelative path safety check now rejects only true parent traversal components (..,../...) without over-rejecting names like..foo
v0.7.0
Added
Vala.Net.Retry- Configurable retry policy with fixed/exponential backoff, jitter, retry predicates, and HTTP status-based retry filteringVala.Net.RateLimiter- Token-bucket rate limiter with non-blocking (allow) and blocking (wait) permit acquisitionVala.Net.CircuitBreaker- Circuit breaker state machine (CLOSED/OPEN/HALF_OPEN) for unstable dependency protectionVala.Io.AtomicFile- Atomic file update helper with optional backup support and consistency-read helperVala.Io.FileLock- Lock-file based inter-process synchronization utility with timeout and callback execution helperVala.Io.ShellandVala.Io.ShellResult- Shell command execution utility with captured output, timeout execution, pipelines, andwhichresolution- New Valadoc wiki guides:
docs/wiki/getting-started.valadocdocs/wiki/io-guide.valadocdocs/wiki/resilience-guide.valadoc
Changed
- Expanded Valadoc class-level documentation across core namespaces (
Vala.Lang,Vala.Io,Vala.Concurrent,Vala.Crypto,Vala.Math,Vala.Time,Vala.Text) with usage-oriented descriptions and examples - Reworked
docs/wiki/index.valadocto include:- design goals
- quick start
- implemented namespace guide
- recommended entry points
- links to practical guides
v0.6.0
Added
Vala.Concurrent.WorkerPool- Fixed-size thread pool with task queue and typed promises (PromiseInt, PromiseString, PromiseBool, PromiseDouble)Vala.Concurrent.ChannelInt- Go-style typed int channel with buffered and unbuffered (rendezvous) modesVala.Concurrent.ChannelString- Go-style typed string channel with buffered and unbuffered (rendezvous) modesVala.Collections.Stream<T>- Fluent pipeline API for collection transformations (filter, map, sorted, distinct, limit, skip, takeWhile, dropWhile, peek, reduce, min, max)Vala.Collections.Lists- Static utility methods for ArrayList operations (partition, chunk, zip, flatten, groupBy, distinct, reverse, sliding, interleave, frequency)Vala.Collections.Maps- Static utility methods for HashMap operations (merge, filter, mapValues, mapKeys, invert, getOrDefault, computeIfAbsent, keys, values, entries, fromPairs)Vala.Collections.MultiMap<K,V>- One-key to multiple-values collectionVala.Collections.ImmutableList<T>- Immutable list value objectVala.Collections.LruCache<K,V>- LRU cache with optional TTL and cache-miss loaderVala.Math.BigDecimal- Arbitrary-precision decimal arithmeticVala.Math.BigInteger- Arbitrary-precision integer arithmeticVala.Encoding.Csv- CSV parser and writer utilitiesVala.Io.Filesystem- Filesystem metadata helpersVala.Io.Console- TTY detection and password input utilitiesVala.Io.Process- Process execution utilitiesVala.Io.Resource- Binary resource read helpersVala.Io.Temp- Temporary file/directory helpers with auto-cleanup callbacksVala.Time.Dates- Date utility helpersVala.Lang.Exceptions- Exception utility classVala.Lang.ShutdownHooks- Atexit callback registrationVala.Lang.Randoms- Random utility class- New delegate types:
BiPredicateFunc<A,B>,TaskFunc<T>,VoidTaskFunc
Changed
- Expanded
README.mdAPI reference for all new classes Lists.distinctStringoptimized from O(n²) to O(n) using HashSet
Fixed
Stream.skipnow guards against negative input- Channel unbuffered mode now implements strict rendezvous semantics (one sender in flight at a time)
- Channel
receive()on closed empty channel returns immediately via sentinel instead of blocking - Channel uses
broadcast()for delivered condition to prevent deadlock with multiple concurrent senders - WorkerPool
enqueue()is now atomic with shutdown check (queue push inside critical section) - WorkerPool promises are always completed with default values when tasks are rejected after shutdown
- WorkerPool
shutdown()is idempotent and guards against self-join deadlock
Infrastructure
- Added vala-lint integration with Docker-based CI check
v0.5.0
Added
Vala.Encoding.Base64- Base64 encode/decode helpersVala.Encoding.Hex- Hex encode/decode helpersVala.Encoding.Url- URL percent encode/decode helpersVala.Crypto.Hash- MD5/SHA hash utilitiesVala.Crypto.Hmac- HMAC utilitiesVala.Crypto.Uuid- UUID value object and parsing helpersVala.Text.Regex- Regular expression utility methodsVala.Regex.Pattern- Compiled regex wrapper with find/replace/group APIsVala.Time.DateTime- Immutable date-time value objectVala.Time.Duration- Immutable duration value objectVala.Time.Stopwatch- Stopwatch for elapsed-time measurementVala.Math.Math- Extended math utility methodsVala.Math.Random- Random number and shuffle helpersVala.Net.Url- Immutable URL value objectVala.Collections.Arrays- Array helper methodsVala.Concurrent.Mutex- Mutex wrapper utilityVala.Concurrent.RWMutex- Read/write lock wrapper utilityVala.Concurrent.WaitGroup- WaitGroup synchronization primitiveVala.Concurrent.Once- Run-once helperVala.Concurrent.Semaphore- Counting semaphoreVala.Concurrent.CountDownLatch- CountDownLatch synchronization primitiveVala.Lang.Process- External process execution wrapperVala.Lang.Preconditions- Argument and state validation helpersVala.Lang.SystemInfo- OS/home/tmp/current-directory helpersVala.Lang.StringEscape- HTML/JSON/XML escaping helpersVala.Lang.Threads- Thread sleep helpersVala.Lang.SystemEnv- Environment variable get/set helpersVala.Conv.Convert- String/number/bool conversion helpersVala.Log.LogLevel- Logging level enumVala.Log.Logger- Named logger with level filtering and pluggable handlersVala.Format.NumberFormat- Number/bytes/ordinal formatting helpersVala.Runtime.SystemProperties- System property and time helpersVala.Config.Properties- Java-like key-value configuration loader/saver
Changed
- Expanded
README.mdAPI reference for new namespaces and classes - Added Meson source and test targets for all newly introduced classes
Fixed
- Updated
etc/uncrustify.cfgfor compatibility with newer uncrustify releases - Fixed
scripts/format.sh --checkto report all formatting diffs without aborting on first mismatch
v0.4.0
Added
Vala.Collections.HashMap<K,V>- Hash table with O(1) average lookup, backed by GLib.HashTableVala.Collections.HashSet<T>- Hash-based set with union, intersection, difference, and subset operationsVala.Collections.LinkedList<T>- Doubly-linked list backed by GLib.Queue with indexed accessVala.Collections.Deque<T>- Double-ended queue with O(1) push/pop at both endsVala.Collections.Pair<A,B>- Immutable two-element value object (Kotlin-style)Vala.Collections.Triple<A,B,C>- Immutable three-element value object (Kotlin-style)Vala.Collections.PriorityQueue<T>- Binary min-heap with custom comparatorVala.Collections.BitSet- Bit manipulation with auto-growing byte array backingVala.Collections.TreeMap<K,V>- Sorted map backed by binary search tree with floorKey, ceilingKey, subMap- New delegate type:
BiConsumerFunc<A,B>
Fixed
- Removed stale docs/images directory
v0.3.0
Added
Vala.Io.Scanner- Tokenized input reader from files, strings, or stdin with configurable delimiterVala.Collections.Optional<T>- Type-safe container for nullable values (inspired by Java Optional, Rust Option)Vala.Collections.Result<T,E>- Success/error container for exception-free error handling (inspired by Rust Result)Vala.Collections.Stack<T>- LIFO stack backed by GLib.QueueVala.Collections.Queue<T>- FIFO queue backed by GLib.QueueVala.Collections.ArrayList<T>- Dynamic array list with O(1) indexed access and functional operations (map, filter, reduce, find, sort)Vala.Io.Files- 10 new file operation methods (readBytes, writeBytes, chmod, chown, lastModified, createSymlink, readSymlink, isSameFile, glob, deleteRecursive)Vala.Io.Path- 5 new path methods (toUri, match, relativeTo, components, separator, volumeName, normalize, abs)- New delegate types:
SupplierFunc<T>,ConsumerFunc<T>,PredicateFunc<T>,MapFunc<T,U>,ReduceFunc<T,U>,ComparatorFunc<T>
v0.2.0
Added
Vala.Io.StringJoiner- Delimiter-separated string construction with prefix/suffix supportVala.Io.BufferedReader- Buffered stream reading from files and stringsVala.Io.BufferedWriter- Buffered stream writing with append supportVala.Io.StringBuilder- Efficient mutable string constructionVala.Io.Files- 12 new file operation methods (copy, move, remove, readAllText, readAllLines, writeText, appendText, size, listDir, tempFile, tempDir, touch)Vala.Io.Path- 12 new path manipulation methods (extension, withoutExtension, withExtension, resolve, parent, join, isAbsolute, isRelative, normalize, startsWith, endsWith, equals)Vala.Io.Strings- 30+ new string utility methods
Changed
- Removed Apache License headers from all Vala source files
Fixed
- Valadoc workflow now correctly detects new untracked files in docs/
Infrastructure
- Test coverage enforcement with 80% threshold
- Coverage reporting with lcov