Giter Club home page Giter Club logo

barge's People

Contributors

dfintha avatar

Stargazers

 avatar

Watchers

 avatar  avatar

barge's Issues

Improve executable lookup

This consists of two parts.

  • First, improve the lookup itself, so on non-Linux platforms, the desired binaries are found.
  • Second, improve error messages, when said binaries are not found, to make the source of the problem unambiguous.

Add an option to perform pre- and post-build steps

cargo allows its users to add a build.rs file, which is compiled and run before building. Following the same idea, barge should be able to run a prebuild and postbuild script before and after building the project, respectively.

These files should be written in one of the following languages.

  • C (built with clang)
  • C++ (built with clang++)
  • Python (executed using python or python3)
  • Shell script (executed using bash)

Fix the software dependency documentation

Currently, the dependencies of barge are not documented correctly. This was introduced when toolsets became a matter of choice. This should be fixed in the documentation.

Add option to create library projects.

Library projects should result in a single SO file, with the name lib[PROJECT_NAME].so.[VERSION], along with a link pointing to this file, named lib[PROJECT_NAME].so.

  • Projects require a new field, defining their type (binary or library).
  • Generated internal make recipes require some refinement.
  • Issue #3 needs to be completed first, so that a version-based filename can be generated.

Refactor the project architecture and add tests

The project currently looks like it evolved organically. A simple, robust architecture should be implemented, functionalities separated into layers, and tests added to each layer, and the in between.

This should be done before #36, the multiplatform support can benefit from these refactors.

Emit more verbose error messages.

In its current state, if an error happens, barge stops its execution, and prints the relevant error to the standard error output.
However, these error messages are way too generic.

  • Add extra information alongside the original errors in BargeError.
  • Extend BargeError with a method to print these in an user-friendly way.

Add FORTRAN support

The GNU FORTRAN compiler could be used to compile source files, and linking together the object files does not need any extra workarounds.

Switch to a more formal license

The WTFPL is a favorite of mine, as it describes complete freedom over the code.

However, it's profane, and a more concise license could be used in its place. The following statements shall be true to the next license of barge.

  • Allows free use of the software or its source code.
  • States that the author is not responsible for potential bugs and/or misuse.
  • Compatible with the licenses of the software's dependencies (mostly MIT and/or Apache 2.0).

An obvious first candidate would be the MIT license (based on the above), however more research is needed to make a choice for the long run.

Map header file dependencies

clang++ -MM $(SOURCES) emits dependecy definitions, which can be used to avoid recompiling everything if any of the header files change. This can improve build times with this tool.

Add support for linker scripts

It is a rare, but important aspect.

When one is writing an operating system (or othzer low-level code), linker scripts are crucial to reach proper function. It shouldn't be too hard to include support for linker scripts, and it should be done.

Refactor the command-line argument parsing.

The current implementation is a very shoddy,, ad-hoc method, which should be replaced by a more sophisticated one, preferably by using an external crate dedicated to argument parsing.

Detect project files from project subfolders

Currently, barge supports itself being run from the project root folder. If the user uses a terminal editor to edit source files (like vim or emacs) they may attempt to use barge from a project subfolder, which is currently not submitted.

The software could check all of its parent folders to find the barge.json file (similar to git looking for the .git directory).

Add command-line options to project initialization

The following switches are proposed to barge init.

  • --executable: Default, create an executable project.
  • --shared-lib: Create a shared library.
  • --static-lib: Create a static library.
  • --json-only: Use an existing directory and create a barge.json file in it.

Support other platforms than Linux

Currently, we pay no mind to other platforms than Linux. But there should be support for the Windows, macOS, and *BSD systems, too.

Non-goals: Using MSVC or other compiler suites for Windows!

On Windows, we'd also use GCC or Clang, or the MinGW cross-compiler. This would require MSYS or Cygwin, however, that is not a problem. On macOS, we can only use the LLVM suite, however, it is available after installing the command-line developer tools. Finally, *BSD systems should have little to no difference to Linux systems from our aspect.

Each scenario must be tested, even if only on a virtual machine.

Add support for unit testing

For the Rust programming language, cargo provides a unit testing framework, and has a separate build target for unit test builds. In the same manner, barge should have a similar functionality.

There are two ideas for this.

  • Create a new unit testing framework, resembling the Rust unit testing framework.
  • Use an existing unit testing framework, and create a build target for it (most viable candidate is gtest).

Add the 'format' subcommand to automatically format the code.

This should be done by using clang-format.
Each project should have a clang-format configuration, with a default generated on init, which can be edited by the user.

  • The barge init subcommand should create a new .clang-format file at the project root.
  • The barge format subcommand should be implemented, to run clang-format configured with the above file on the project files.
  • After formatting, the changes should not be automatically committed, this is the user's task (just like with cargo fmt).

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.