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

CHANGE pdx name to use project name #54

Merged
merged 2 commits into from
Mar 16, 2024

Conversation

ninovanhooff
Copy link
Collaborator

@ninovanhooff ninovanhooff commented Feb 20, 2024

This changes the pdx name from a hardcoded "playdate.pdx" to "wheelsprung.pdx" in my case.

For me, this fixes the simulate task. But perhaps that's because I changed the pdx name somewhere else, too?

Note that the example project also uses workspaceFolderBaseName in launch.json: playdate_example/.vscode/launch.json

@samdze
Copy link
Owner

samdze commented Mar 3, 2024

Yeah the build config may need a few fixes.
For now the best choice is to name the build products the same as the project containing folder.

This is because it's the simplest way to make sure the VSCode launch config and the build process both align on the same (non static) pdx name.

@ninovanhooff
Copy link
Collaborator Author

ninovanhooff commented Mar 16, 2024

Not sure I understand whether you agree with this change or that you want me to change something or abandon it.

This change will name the build product after the project folder, which is what you want, right?

@samdze
Copy link
Owner

samdze commented Mar 16, 2024

Sorry! I agree with the idea, and most of the time your implementation would work, but there probably isn't a 100% guarantee the project name matches the project folder name.

It would be very uncommon to change folder name and lose sync, but I'd like to take this into consideration.
system/nimscript's thisDir() or projectDir() can be used to achieve full coverage.

@ninovanhooff
Copy link
Collaborator Author

Done, note that

  • You might want to review all other usages of projectName() in the project and change where necessary
  • I got two warnings for ambiguous calls in this file, for getEnv and fileExists. The match os and nimscript. Didn't touch them, clarify at your own discretion

@samdze samdze merged commit 056df90 into samdze:main Mar 16, 2024
2 checks passed
@samdze
Copy link
Owner

samdze commented Mar 16, 2024

This should be good to go for now, other uses of projectName() are related to Nim caches or cleaning stuff.
Thanks!

@ninovanhooff ninovanhooff deleted the project-name-as-psx-name branch November 10, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants