Week 6: Wrap Up Stdlib Hashmaps and Kick Off Submodule Implementation

June 27, 2025

← Back to Home

Hi everyone, welcome to the sixth blog of my GSoC'25 journey. I started the week by working on Stdlib Hashmaps and was able to wrap up Hashmaps package by Sunday evening. Now, all test files of Hashmaps are correctly executing without any errors, obviously, with workarounds. Also, most examples of hashmaps are working well. Only a few examples are not working where creating workarounds is not possible. Some non-working examples require Submodule Implementation and thus, we can handle them after my work on Submodules.

Firstly, I worked on examples of Hashmaps. Most of them were working well after creating small-small workarounds. Commit Link representing workarounds related examples of Hashmaps is workarounds for Hashmap examples. After this, Working examples of Hashmaps were set up on CI to prevent regression. Link to Merged Pull Request for setting working examples on CI can be found here. Some examples were not wokring and were diffcult to workaround. Commit link to track such examples is disabled examples.

After that, I started to work on Test Maps file. It was just a repetition of first two test files (Test Open Maps and Test Chaining Maps) which were compiled earlier and so, I didn't face much difficulties while compiling this test file. For the Compilation of Test Maps, only one new MRE was created which is Issue #7852. Corresponding workaround for this MRE is workaround for issue #7852. Workarounds created in favour of Test Maps can be tracked through n-lf-hashmaps-5. With these workarounds, Test Map was also executing correctly without any errors or failures. Link to Merged Pull Request to set Test Maps on CI is here.

With these, we wrapped up Hashmaps package of Stdlib. After this, we moved to next phase of our GSoC journey which is Submodules. For the next two days, I investigated all workarounds of stdlib that were related to submodules to find various MREs related to it. From my research, I found that all submodule workarounds of stdlib were directly or indirectly related following two issues :-

Main reason behind both the issues was that the module interface was not able to link with its corresponding submodule implementation. Meanwhile, while creating MREs for submodule, I created a MRE related to stdlib sorting which is Issue #7883. I thought the workaround was related to submodule but eventually, found the MRE created from workaround was because of some other error. Also, I fixed this MRE in this Merged Pull Request. Then, I read a bit about submodules and was able to deduce following features about submodules :-

Then, I studied a bit about how currently we are implementing submodules and modules in LFortran and with thorough discussion with Ondrej Certik, we came to following plan for submodule implementation :-

For the next week, I am planning to work on the above discussed plan. I will use Issue #7270 as a reference to see if the things are going in the correct direction or not. By the end of next week, I will try to complete at least first two steps of above discussed plan and will try my best to make as much progress as I can in the third step and eventually in Issue #7270.

Overall, I worked for 32 hours this week and enjoyed the work that I did in the sixth week and would like to thank Ondrej Certik, Harshita Kalani, Pranav Goswami and all the other LFortran members for their reviews and suggestions which helped me a lot to tackle new difficulties. I am looking forward to continue my journey in the next week with the same excitement and enthusiasm and plan to complete my proposed tasks as quickly as I can.