jgabaut / invil Goto Github PK
View Code? Open in Web Editor NEWA Rust implementation of amboso.
Home Page: https://github.com/jgabaut/amboso
License: GNU General Public License v3.0
A Rust implementation of amboso.
Home Page: https://github.com/jgabaut/amboso
License: GNU General Public License v3.0
Ever since their introduction, map keys are stored as String
and no Ord
is implemented to handle the keys being semver
values.
This leads to the wrong ordering being used, which notably results in potentially the wrong version being build when running invil build
on a project.
To Reproduce
invil
0.1.2
invil build
on a repolatest
may not be the correct one (eg. 0.3.9
is picked over 0.3.13
).Expected behavior
Keys are compared as semver
(eg. 0.3.13
is picked over 0.3.9
).
0.1.2
The generated anvil__PROJ.c
file is missing an ending newline, which will fail compilation under -pedantic
.
Version: <=0.1.7
An effort should be made to be able to pass args to the cc
call. See long-standing issue on amboso.
Cargo tests for parsing stego.lock
as TOML
should be added, along with a stego-examples
directory to hold at least two examples, one correct and one wrong.
Reference the files used in amboso
stego
parsing tests: link
Success is expected for good.stego
and lock.stego
, failure is expected for bad.stego
.
Most likely, the grammar expressed by regex in the bash
implementation would not align with our expectations and we may need to adjust our examples, while still keeping the main expected format.
See also #2
Since we're using clap
the current print functions to display asserted flags in groups could be redundant.
We could group the arguments in some way instead, and find some clap
supported function to output the desired information.
Reference the clap
docs: link
With 0.0.8
, a naive implementation of autotools
prep for do_build()
was added.
However, it could be improved.
autoconf
and automake
autotools
availabilityautoconf
and automake
needed to generate the Makefile
Eventually, parity with amboso
2.x
should be reached and a --strict
flag could be implemented to disable all extension and ensure to run with full compatibility to the bash version.
The linter
argument should be used to behave as a stego
linter. This would allow checking if expectations about stego.lock
format are correct.
The ./anvil
symlink created in handle_init_subcommand()
is not working as of 0.2.3
.
To Reproduce
Steps to reproduce the behavior:
invil init ./new-proj
./new-proj/anvil
./new-proj/amboso/amboso
./new-proj/amboso/amboso
works as expectedExpected behavior
./anvil
links to ./new-proj/amboso/amboso
<= 0.2.3
A warning for filenames being equal (ignoring case) could be emitted when running on such a platform, in some cases:
Basemode
(all files for each dir?)A call with no arguments could be handled to just run make
if a Makefile
is available, or try generating it if possible.
See related amboso
issue at this link.
Currently, the stego.lock
file is simply printed out when found.
It should be parsed as TOML
and the result checked for.
Alternatively, custom parsing logic could be implemented.
The new stego.lock
format we're targeting is supported by amboso
from version 1.8.0
. See reference: Pull request
amboso
's stego.lock
should be compatible with toml
for versions >=1.9.6
.Docs for parsing TOML
: link
It seems that the reference stego
format from amboso
is not valid to parse as toml::Table
.
An update to the reference format to fix this may be helpful, as I really don't want to miss out on assuming stego
is valid for toml::Table
.
As of amboso
1.9.5
, the reference implementation uses a stego.lock
which can be successfully parsed as toml::Table
.
However, the version
keys are getting parsed as dotted keys, ending up with a version = {{{ ... }}}
definition where each major version is a key in the first level of the values.
As of amboso
1.9.6
, the reference implementation allows quoted left-values, so that the semver keys don't get parsed as dotted keys by toml
.
See also: #3
Versions 0.1.3
, 0.1.4
generate a C header with wrong underscores.
Fixed in 0.1.5
.
Needed functions for test mode should be implemented.
anvil_env.kazoj
.stderr, .stdout
-b
Needed functions to support -G <target-dir> <tag>
should be implemented.
This flag should output appropriate .c
and .h
files to the passed target-dir
.
Version 0.2.0
added handle_empty_subcomman()
, but since it's handled in main before any other check on the arguments, any invocation with no subcommand falls there and returns early.
Version: 0.2.0
As of version 0.2.1
, a run from a non-repo directory fails with:
[ERROR] Failed git check. Error was: {could not find repository at './'; class=Repository (6); code=NotFound (-3)}
[ERROR] check_passed_args() failed with: "could not find repository at './'; class=Repository (6); code=NotFound (-3)"
This could be changed by better handling the result of our discovery, to have different behaviour when outside the happy path.
As of 0.1.5
, the version tags stored as keys in BTreeMap
are not following an Ord
based on semver semantics.
This should be taken care of by:
Check if keys are valid semver names before inserting them in the map
Implement ordering for the BTreeMap
, by wrapping the stored String
in a Semver
Version 0.1.5
A typo makes the check invalid:
In src/ops.rs, handle_empty_subcommand()
:
.configure.ac
should be ./configure.ac
Version: 0.2.0
Needed functions for base and git mode should be implemented.
stego.lock
. See #2.make
Reference: amboso_main()
from here.
See related amboso issue:
Op flags for base
run-mode can be handled to try performing the requested operation for requested tag.
-r
for running-b
for building (ATM only basic gcc
call is supported)-d
to delete-i
for building all supported tags (ATM only basic gcc
call is supported)-p
for deleting all binaries for supported tags-t
should behave like requested op was for all tests. Slight clap
Args
configuration changes may be needed.
Subcommands (at the moment, only init
and build
) should be handled in a sensible way, using stego
values.
0.0.7
added a naive implementation for the Gitmode
branch in do_build()
. See PR.
Using Command
for each needed step should be avoided, when a more idiomatic Rust solution can be used instead.
The basic pipeline should be something like:
git checkout <query> && git submodule update --init -recursive && make && mv <bin> <tag_dir> && git switch - && git submodule update --init --recursive
Version 0.1.6
runs make rebuild
by default and make
when --no-rebuild
is passed.
I think there's some git flag we can use to do the checkout and first submodule prep in one command.
As of 0.1.3
, the C header generated with -G
contains helapordo
on some instances where th project name should be used.
<=0.1.3
amboso
2.0.2
added:
-a
to specify a version to run as-k
to specify the core project typeBoth features should be ported to 0.2.4
.
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.