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

Update Pascal filedef and extension mappings #3694

Merged
merged 2 commits into from Nov 23, 2023
Merged

Update Pascal filedef and extension mappings #3694

merged 2 commits into from Nov 23, 2023

Conversation

rdipardo
Copy link
Contributor

filetypes.pascal

  • add line comments

  • pair the 'fpc' compile command with another common Free Pascal utility 1, 'instantfpc', to build and run the current file in a single step

filetype_extensions.conf

  • add Lazarus project files (*.lpr)

Footnotes

  1. https://wiki.freepascal.org/InstantFPC

  #### filetypes.pascal

  - add line comments

  - pair the 'fpc' compile command with another common Free Pascal
    utility [^1], 'instantfpc', to build and run the current file
    in a single step

  #### filetype_extensions.conf

  - add Lazarus project files (*.lpr)

[^1]: https://wiki.freepascal.org/InstantFPC
@elextr
Copy link
Member

elextr commented Nov 19, 2023

If the compile command is generating an executable there is no way of running it, instead of removing the run command add a second one. See this.

@rdipardo
Copy link
Contributor Author

Check 9ca281b to see if I have the right idea.

Since Pascal compilers are single-pass, the nearest equivalent to a strict compile command seems to be the option to skip the linker (-s).

A new side-effect will be the generation of a linker script and a link<PID>.res artifact, in additional to objects, if the target is a program or library. A unit will only generate an object as before, no matter if "Compile" or "Build" is run.

@elextr
Copy link
Member

elextr commented Nov 20, 2023

LGBI and makes sense given the pecularities of the Pascal compilers.

And finally another filetype file converted to the "new" build, its only been 13 years, maybe I shouldn't have made backward compatibility so good ;-)

@rdipardo
Copy link
Contributor Author

Finally another filetype file converted to the "new" build, its only been 13 years

Mass migrations to a new spec are seldom worth the effort, and there's always somebody who prefers the old way.

As for the long neglect of Pascal, it's no surprise when the Lazarus IDE has been free and cross-platform for as long as Geany's been around, and it still supports GTK2, even if that's only thanks to inertia.

@elextr
Copy link
Member

elextr commented Nov 20, 2023

Couldn't be bothered with inertia. ;-)

@elextr elextr merged commit e5680fe into geany:master Nov 23, 2023
4 checks passed
@elextr
Copy link
Member

elextr commented Nov 23, 2023

Thanks, although I don't have pascal to test it, since nobody objected, so I overcame the inertia and merged ;-)

@rdipardo rdipardo deleted the feat/better-free-pascal-dx branch November 30, 2023 12:06
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.

None yet

2 participants