Giter Site home page Giter Site logo

Single file library about powershelllibjava HOT 3 CLOSED

charphi avatar charphi commented on September 1, 2024
Single file library

from powershelllibjava.

Comments (3)

Tuupertunut avatar Tuupertunut commented on September 1, 2024

Isn't it kind of an anti-pattern to include libraries as sources? As to why I think it couldn't be one file, AsyncReaderRecorder and PowerShell are very different classes and wouldn't fit well together.

from powershelllibjava.

charphi avatar charphi commented on September 1, 2024

It might be an anti-pattern indeed.

My purpose is to follow a zero-dependency policy in my libraries.
Therefore I need to repackage the dependencies of my libraries.

I've tried maven shade plugin. This plugin relocates dependencies by modifiying byte code directly. Unfortunatly, it doesn't repackage module-info classes (JPMS).

The second solution I've found so far is to to automate source extraction of dependecies to a second source directory before the compilation of all the source code (lib + dependencies). Having a single source file eases this.

AsyncReaderRecorder and PowerShell are indeed very different classes. My guess is that AsyncReaderRecorder could be moved into PowerShell as a private class if it has no use outside of the library itself.

from powershelllibjava.

Tuupertunut avatar Tuupertunut commented on September 1, 2024

Ok, I see. Your use case is quite special. Unfortunately I have no interest in changing the architecture of this library, as it fits most use cases just fine. The best solution would probably be to include all 3 files as source. Or I guess you could create something that packs everything into one class as inner classes.

from powershelllibjava.

Related Issues (13)

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.