-
Notifications
You must be signed in to change notification settings - Fork 140
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
ApiContext, scons arguments, Modify command, and _build directory. #469
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eration for renaming resources to api_context. No change in behavior.
renamem resources.py in a follow up change.
…AGES_DIR to have in its absolute path the word 'packages' (case insensitive). The motivation is to avoid unintentional mass deletion by the rmtree operation of the packges fixer.
From: Active env options ['APIO_HOME_DIR', 'APIO_PLATFORM'] To: Active env options [APIO_HOME_DIR, APIO_PLATFORM]
This is a convention only and should not affect functionality.
Motivation is code simplicity. Before they were created structued and then flatten before passing to scons. Now they are flag from the begining.
…gs'. No change in behavior.
…ented using 'smart args' represented by class instances (used to be simple strings). Hopefully this make the code clearer and safer. Will do another pass of cleanup once we make apio.ini mandatory and delete the unnecessary flags.
is conditional on the project_scope arg. Some operations such as 'apio create' do not need to load the project (which may not exist yet). Similar to setup programs such as apio install and apio drivers.
a property to get the project info after a verification that it's loaded.
zapta
changed the title
ApiContext and scons arguments related changes.
ApiContext, scons arguments, and Apio Modify command related changes.
Nov 20, 2024
called _build, under the project dir. This follows platformio's convention of seperating between sources and artifact files and simplifies setting a simple and stable .gitignore file. I tested it on darwin_arm64 but to test it on a windows box I need to submit it first.
zapta
changed the title
ApiContext, scons arguments, and Apio Modify command related changes.
ApiContext, scons arguments, Modify command, and _build directory.
Nov 20, 2024
a source file and not a build artifact.
lists boards and 'apio fpgas' that lists fpgas. Functionality stayed the same.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains assorted commits, for the details description please see the individual commits.
The highlights of this PR:
Resources is now called ApiContext and it's the main object that is created once at the beginning of each command and is passed only. Access to resources, project, and so on is done via that object.
Refactored the scons argument logic. process_arguments now uses instances of a new class called Arg to hold the each argument. I plan to do another path of cleanup there once we apio.ini becomes required and we eliminate commands options such as --size and --fpga.
Marked the 'apio modify' command as deprecated, no change in functionality. With the upcoming elevation of apio.ini to a required source of truth and the planned additional configuration fields, users are expected to edit apio.ini manually, similar to platformio.ini.
Following the platformio's convention, all build and artifact files are now placed in a subdirectory called _build (platformio uses .build) under the project dir.
Split the
apio boards
command intoapio boards
that lists boards andapio fpgas
that prints fpgas.