GithubHelp home page GithubHelp logo

Epl sandbox about epl HOT 3 CLOSED

cask avatar cask commented on September 27, 2024
Epl sandbox

from epl.

Comments (3)

swsnr avatar swsnr commented on September 27, 2024

@rejeep I'm not sure. Imho such a function β€œfakes” something, which doesn't exist, namely, a stateless package system. But there is no such thing. Let's face it, package.el has global state, whether we like it or nor, and we cannot complete undo state established by epl-package-install.

Most notably, it'll activate the new package, which loads its autoloads. That cannot be undone easily.

I wonder, what you need that for, by the way. Do you plan to provide an API to use multiple Cask environments at once?

I wouldn't like that. It's bound to cause trouble, because however hard we work, the single global state of package.el will leak through our abstractions, and cause trouble. The Emacs library and package system is simply not up to handle this.

Imho, as such we shouldn't offer such a feature. We can provide an API to parse arbitrary Cask bundles, build packages, docs, whatever, but we effectively can only have a single Cask bundle active, and we can easily switch active Cask bundles.

from epl.

rejeep avatar rejeep commented on September 27, 2024

I'm mostly concerned about external side effects in Cask functions. For example modification of the load-path.

Most functions in Cask now takes a bundle as argument that defines the current Cask project. The problem is that functions operating on a bundle sometimes need to have the bundle as the "active" package.el directory, for example cask-install.

The reason I started thinking about this is that I added a function in Cask called cask-installed-dependencies. To be able to get a list of the installed dependencies, the directory has to be initialized (package-initialize) and this will change the load-path.

I wonder if each function that has side effects should do their own clean up. For example in this function, we would restore load-path, but perhaps not care about internal package.el changes.

I guess, as you say, we cannot be perfect because that's just how package.el works and all we can do is out best. Frustrating though...

from epl.

rejeep avatar rejeep commented on September 27, 2024

I'm closing this for now and if I can find a better concrete use cases where this would be the best solution, I'll open up the issue again.

from epl.

Related Issues (20)

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.