Git Product home page Git Product logo

Comments (16)

benogle avatar benogle commented on July 25, 2024

There are several reports of this. Something must have broken in the upgrade from 165 to 166.

See atom/atom#4855, See atom/atom#4856

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

I'm getting this one, myself, in every project I open. I'll take a peek around, see if I can be of any help.

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

I think @vraravam is onto something with this in #45:

Also noticed that the preference setting for ''dataSaveFolder' (which was set to '/Users/vijay/.atom/packages/save-session/projects') keeps getting removed from the '.atom/config.cson' file and this could be the reason for the beginning value of 'undefined' when this plugin is trying to figure out the location of the 'project.json' file.

save-session prepends dataSaveFolder to the path to project.json (looked up through @saveFolder), but since it's now undefined, it's literally prepending "undefined", which results in an invalid path. Looks like the default gets set in @saveFolderDefault, but I don't see where that gets called. Judging from #44, @wn9FHW2nhO doesn't, either.

from save-session.

benogle avatar benogle commented on July 25, 2024

@clhynfield what does your config contain for save-session? Config things did change in 166.

cc @maxbrunsfeld

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024
  'save-session':
    'project': '/Users/clayton/.atom'
    'windowX': 0
    'windowY': 23
    'windowWidth': 1280
    'windowHeight': 773
    'treeSize': 201

Also, as @vraravam notes in #45, even when I set dataSaveFolder manually in ~/.atom/config.cson, it's gone again shortly after.

Oh, and it looks like Config.saveFolderDefault is supposed to be called at package activation time, but even if I yank it out of the conditional, and/or move it up to the top of save-session.coffee, it doesn't seem to set the config.

from save-session.

benogle avatar benogle commented on July 25, 2024

There were some large config changes in 166. @maxbrunsfeld should know more.

from save-session.

maxbrunsfeld avatar maxbrunsfeld commented on July 25, 2024

Looking into it now.

from save-session.

maxbrunsfeld avatar maxbrunsfeld commented on July 25, 2024

My first guess is that it's because dataSaveFolder is not present in save-session's config schema. Schemas are now enforced in certain cases where they weren't before.

Looking into it deeper to verify.

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

Thanks very much, @maxbrunsfeld, that was it. I added this to the default config in save-session.coffee, and the package is working as expected:

    dataSaveFolder:
      type: 'string'
      description: 'The folder in which to save project states'

I'll submit a PR shortly.

from save-session.

maxbrunsfeld avatar maxbrunsfeld commented on July 25, 2024

Great! Thanks @clhynfield.

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

Couple of asides out of this:

  1. Direct file IO seems like a kludgy way to save project/workspace state—is there a more Atom-y way to do this?
  2. The error messages and stack traces caused by this third-party package didn't implicate the package in any way. I imagine this could cause serious headaches for the core Atom team as packages proliferate.

from save-session.

maxbrunsfeld avatar maxbrunsfeld commented on July 25, 2024
  1. The package system already allows packages to save and load state as part of activation and deactivation. I'm not familiar with all of save-session's functionality, so I don't know if loading its saved state at package activation time would work.
  2. The notification system will associate errors with packages when possible, but often the stack trace doesn't contain enough information to do this. Perhaps we could use node's domain system to associate async stack traces with the packages that created them, but this might be more work than it's worth.

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

I figured serialization might be the way to do it. Dunno if @mpeterson2 has looked at that, but if I get the time, I'll see if it'll work. Thanks again, @maxbrunsfeld!

from save-session.

mpeterson2 avatar mpeterson2 commented on July 25, 2024

I haven't had time to look into this yet. I see a few of you have forked this, so I'd be happy to accept a pull request if you guys can find a fix.

from save-session.

clhynfield avatar clhynfield commented on July 25, 2024

Working it up now, @mpeterson2. Thanks much.

from save-session.

mpeterson2 avatar mpeterson2 commented on July 25, 2024

Just merged a few pull requests in that fixed the issue for me. Thanks for the help guys.

Reopen this if you still have issues.

from save-session.

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.