symmetryinvestments / dsemver Goto Github PK
View Code? Open in Web Editor NEWA tool to compute the next semver for dlang programs
A tool to compute the next semver for dlang programs
a simple dub init creates a source/app.d
file that has no module statement. The name in the .dsemver/xyz.json for the module is missing because of that and it crashed in ast.d:165
Reproduction Steps:
git clone https://github.com/chances/teraflop-d.git && cd teraflop-d
dub run dsemver -- -p . -l
Building package dsemver in /home/chances/.dub/packages/dsemver-1.1.0/dsemver/
Performing "debug" build using /home/chances/dlang/ldc-1.24.0/bin/ldc2 for x86_64.
argsd 1.0.0: target for configuration "library" is up to date.
dsemver 1.1.0: target for configuration "application" is up to date.
To force a rebuild of up-to-date targets, run again with --force.
Running ../../.dub/packages/dsemver-1.1.0/dsemver/dsemver -p . -l
DFLAGS="WARNING: A deprecated branch based version specification is used for the dependency gfx:vulkan. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
WARNING: A deprecated branch based version specification is used for the dependency gfx:graal. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
WARNING: A deprecated branch based version specification is used for the dependency gfx:genmesh. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
Target 'teraflop' doesn't exist. Is the target type set to "none" in the package recipe? -X -Xf=.dsemver/dsemver_0.7.1.json" dub build
dub run dsemver -- -p . -c
std.file.FileException@std/file.d(371): ./.dsemver/dsemver_0.7.1.json: No such file or directory
----------------
??:? [0x55aa8e919095]
??:? [0x55aa8e924a16]
??:? [0x55aa8e90af6d]
??:? [0x55aa8e8d9d80]
/home/chances/dlang/ldc-1.24.0/bin/../import/std/file.d:320 [0x55aa8e88308e]
/home/chances/dlang/ldc-1.24.0/bin/../import/std/file.d:519 [0x55aa8e882cfd]
ast.d:147 [0x55aa8e8875e8]
/home/chances/GitHub/teraflop-d/../../.dub/packages/dsemver-1.1.0/dsemver/source/app.d:82 [0x55aa8e8984b8]
??:? [0x55aa8e90ac3b]
??:? [0x55aa8e90ab37]
??:? [0x55aa8e90a98d]
/home/chances/dlang/ldc-1.24.0/bin/../import/core/internal/entrypoint.d:42 [0x55aa8e899594]
??:? __libc_start_main [0x7fcc6819cbf6]
??:? [0x55aa8e85f889]
The first thing I did was :
$ dsemver
in a directory with a dub.json
and it yielded no output. I was expecting the help, or a SemVer to be calculated.
dub run dsemver@ -- -h
Fetching dsemver ~master...
Building package dsemver in /home/luis/.dub/packages/dsemver-master/dsemver/
Performing "debug" build using /usr/bin/dmd for x86_64.
argsd 1.0.0: target for configuration "library" is up to date.
dsemver ~master: building configuration "application"...
../../../.dub/packages/dsemver-master/dsemver/source/dsemver/compare.d(120,2): Error: invalid `foreach` aggregate `old.members`, define `opApply()`, range primitives, or use `.tupleof`
/usr/bin/dmd failed with exit code 1.
Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.
https://semver.org/#spec-item-4
In my use case I have an unstable API, but I'd still like to share it on dub.
To reproduce:
$ dsemver -p . -c
Output is:
DFLAGS=" -X -Xf=.dsemver/dsemver_latest.json" dub build
No tags that match a semver found in '.'
It seems the git tag aren't found, but there are a lot of them:
C:\Users\guill\Desktop\intel-intrinsics>git tag
v1.0.0
v1.0.1
v1.0.10
v1.0.11
v1.0.12
v1.0.13
v1.0.14
v1.0.15
v1.0.16
v1.0.17
v1.0.18
v1.0.19
v1.0.2
v1.0.20
v1.0.21
v1.0.22
v1.0.23
v1.0.24
v1.0.25
v1.0.26
v1.0.27
v1.0.28
v1.0.29
v1.0.3
v1.0.30
v1.0.31
v1.0.32
v1.0.4
v1.0.5
When you have the following interface:
interface Foo {
void Bla(Exception);
}
it crashed because the param has no name.
if you have overloaded templated methods (probably it can be any templated symbols):
class Foo {
auto aSymbol(T)(args1) {...}
auto aSymbol(T)(args2) {...}
dmd issues that symbols separately as different entities (in json file) and dsemver fails because when it looks for aSymbol(args1) template in aSymbol(args2) template it fails obviously and eagerly exit but it should continue searching in that case to find appropriate symbol.
Currently workaround is:
class Foo {
template aSymbol(T) {
auto aSymbol(args1) {...}
auto aSymbol(args2) {...}
}
It's possible that old versions of a package stop compile by new compiler version. In that case dub build should print the error message to user be able to fix the error. In other case instead of fixing of his error user thinks that dsemver fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.