Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Storage Class #1929

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d5940b6
Initial commit to clean up projects; spun off find-file to its own pl…
adamharrison Apr 1, 2023
2f4aff1
Bump modversion.
adamharrison Jun 22, 2024
a716131
Bumped modversion and changed a few minor things.
adamharrison Jun 22, 2024
f2fd9ba
Added in handling of ignored files.
adamharrison Jun 22, 2024
0350614
Fixed small issue.
adamharrison Jun 27, 2024
3cc4543
Fixed issue with absolute arguments.
adamharrison Jul 5, 2024
9e2ec1b
Removed home encoding; may revert this if I can find out why it was d…
adamharrison Jul 7, 2024
9c05676
Fixed minor issue with file suggestions.
adamharrison Aug 22, 2024
0303199
Cleaned up treeview.
adamharrison Aug 22, 2024
41f8206
Typo.
adamharrison Aug 22, 2024
59650ec
Added in visible.
adamharrison Aug 23, 2024
056a2cb
Ensured that the appropriate project module is loaded.
adamharrison Sep 10, 2024
975e416
Fixed improper rebase.
adamharrison Sep 10, 2024
17a3503
Abstracted out the storage system of the workspace plugin so other pl…
adamharrison Mar 6, 2024
3de9036
Fixed double return.
adamharrison Mar 6, 2024
a8fce83
Fixed functional issue.
adamharrison Mar 6, 2024
11af515
Added documentation.
adamharrison Apr 3, 2024
b84738f
Sumenko reports duplicate function definitions, unsure why.
adamharrison Apr 3, 2024
d5dbfad
Fixed minor bug with workspace.
adamharrison Sep 28, 2024
7be990f
Fixed switching projects on restart.
adamharrison Oct 9, 2024
f2a66b4
Merge branch 'master' into PR/project-rework
adamharrison Oct 22, 2024
00d708c
Harmonized spacing around asserts, and fixed an issue forgetting to s…
adamharrison Nov 3, 2024
86388a6
Made project an object.
adamharrison Nov 3, 2024
62bc82e
Removing unecessary yields.
adamharrison Nov 3, 2024
28b7029
Removed unecessary fallback.
adamharrison Nov 3, 2024
fed7967
Removed unecessary line.
adamharrison Nov 3, 2024
64b5f57
Reveted backslash handling, as it doesn't seem to make any difference.
adamharrison Nov 3, 2024
8e0ae38
Spacing.
adamharrison Nov 3, 2024
320695c
Only stonks.
adamharrison Nov 3, 2024
19046d0
Removed uneeded error handling.
adamharrison Nov 3, 2024
fef8f81
Added in function to determine project by path, and added in deprecat…
adamharrison Nov 3, 2024
dcb0ee6
Merge branch 'master' into PR/project-rework
adamharrison Nov 3, 2024
0bb8d7e
Removed storage module.
adamharrison Nov 3, 2024
283b0ae
Typo.
adamharrison Nov 3, 2024
0a3b440
Changed to use deprecation log instead of regular warn so as to not s…
adamharrison Nov 27, 2024
10f2ab9
Fixed small bug with saving workspaces on project change.
adamharrison Nov 27, 2024
b20a85c
Revert "Removed storage module."
adamharrison Nov 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added in function to determine project by path, and added in deprecat…
…ion warnings for legacy interface.
  • Loading branch information
adamharrison committed Nov 3, 2024
commit fef8f812d7525f5ed621d4138b419c5e5bc22c3a
14 changes: 10 additions & 4 deletions data/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ end


function core.load_project_module()
local filename = core.project_absolute_path(".lite_project.lua")
local filename = core.root_project():absolute_path(".lite_project.lua")

if system.get_file_info(filename) then
return core.try(function()
Expand Down Expand Up @@ -780,10 +780,16 @@ function core.pop_clip_rect()
renderer.set_clip_rect(x, y, w, h)
end

-- legacy interface
function core.root_project() return core.projects[1] end
function core.normalize_to_project_dir(path) return core.root_project():normalize_path(path) end
function core.project_absolute_path(path) return core.root_project() and core.root_project():absolute_path(path) or system.absolute_path(path) end
function core.project_for_path(path)
for i, project in ipairs(core.projects) do
if project.path:find(path, 1, true) then return project end
end
return nil
end
-- Legacy interface; do not use. Use a specific project instead. When in doubt, use root_project.
function core.normalize_to_project_dir(path) core.warn("Using deprecated function core.normalize_to_project_dir") return core.root_project():normalize_path(path) end
function core.project_absolute_path(path) core.warn("Using deprecated function core.project_absolute_path") return core.root_project() and core.root_project():absolute_path(path) or system.absolute_path(path) end

function core.open_doc(filename)
local new_file = true
Expand Down